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