Exemplo n.º 1
0
 public void testGoodJson() {
   final YahooEmail yahooEmail = new YahooEmail();
   yahooEmail.buildFrom(JsonHelper.getFirstNode(GOOD_JSON));
   assertEquals(ID, yahooEmail.getId().intValue());
   assertTrue(yahooEmail.getPrimary());
   assertEquals(HANDLE, yahooEmail.getHandle());
   assertEquals(TYPE, yahooEmail.getType());
 }
Exemplo n.º 2
0
 public void testBadJson() {
   final YahooEmail yahooEmail = new YahooEmail();
   yahooEmail.buildFrom(JsonHelper.getFirstNode(BAD_JSON));
   assertNull(yahooEmail.getId());
   assertNull(yahooEmail.getPrimary());
   assertNull(yahooEmail.getHandle());
   assertNull(yahooEmail.getType());
 }