示例#1
0
  @Test
  public void testTypeLiteralMap() throws Exception {
    JsonCodec<Map<String, Person>> jsonCodec = jsonCodec(new TypeLiteral<Map<String, Person>>() {});

    Person.validatePersonMapJsonCodec(jsonCodec);
  }
示例#2
0
  @Test
  public void testMapJsonCodecFromJsonCodec() throws Exception {
    JsonCodec<Map<String, Person>> jsonCodec = mapJsonCodec(String.class, jsonCodec(Person.class));

    Person.validatePersonMapJsonCodec(jsonCodec);
  }
示例#3
0
  @Test
  public void testListJsonCodecFromJsonCodec() throws Exception {
    JsonCodec<List<Person>> jsonCodec = listJsonCodec(jsonCodec(Person.class));

    Person.validatePersonListJsonCodec(jsonCodec);
  }
示例#4
0
  @Test
  public void testTypeLiteralList() throws Exception {
    JsonCodec<List<Person>> jsonCodec = jsonCodec(new TypeLiteral<List<Person>>() {});

    Person.validatePersonListJsonCodec(jsonCodec);
  }
示例#5
0
  @Test
  public void testJsonCodec() throws Exception {
    JsonCodec<Person> jsonCodec = jsonCodec(Person.class);

    Person.validatePersonJsonCodec(jsonCodec);
  }