public void testRatingFromJsonEmpty() throws Exception { try { Rating test = JsonConverter.ratingFromJson(jsonRatingEmpty); fail("Should of erred"); } catch (Exception e) { } }
public void testRatingFromJsonFull() throws Exception { Rating test = JsonConverter.ratingFromJson(jsonRatingFull); assertEquals(test.getScore(), 5); assertEquals(test.getComment(), "star"); }
public void testRatingFromJsonMissing() throws Exception { Rating test = JsonConverter.ratingFromJson(jsonRatingMissing); assertEquals(test.getScore(), 3); assertEquals(test.getComment(), ""); }