Ejemplo n.º 1
0
  @Test
  public void testParser_NoTitle() {
    final TitleParser parser = new TitleParser();
    final Response<TitleAlchemyEntity> response = parser.parse(getJsonString_NoTitle());

    assertEquals(0, response.size());
  }
Ejemplo n.º 2
0
  @Test
  public void testParser() {
    final TitleParser parser = new TitleParser();
    final Response<TitleAlchemyEntity> response = parser.parse(getJsonString());

    assertEquals(1, response.size());

    final Iterator<TitleAlchemyEntity> iter = response.iterator();
    final TitleAlchemyEntity entity = iter.next();

    assertEquals(TITLE, entity.getTitle());
  }