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()); }
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()); }