@Test public void testOutputForValidHaikuHasYes() throws Exception { String output = haikuReview.review(VALID_INPUT_ONE); assertThat(output).contains("Yes"); }
@Test public void testOutputForInvalidHaikuHasNo() throws Exception { String output = haikuReview.review(INVALID_FIRST_LINE); assertThat(output).contains("No"); }
@Test public void shouldSerializeValueToJsonWithTypeAdapter() { //given Javers javers = JaversBuilder.javers() .registerValueTypeAdapter(new ObjectIdTypeAdapter()) .build(); //when ObjectId id = ObjectId.get(); MongoStoredEntity entity1 = new MongoStoredEntity(id, "alg1", "1.0", "name"); MongoStoredEntity entity2 = new MongoStoredEntity(id, "alg1", "1.0", "another"); Diff diff = javers.compare(entity1, entity2); //then String json = javers.getJsonConverter().toJson(diff); Assertions.assertThat(json).contains(id.toString()); System.out.println(json); } }