Skip to content

Commit

Permalink
slightly more relevent unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentonPoke committed Aug 16, 2020
1 parent a31e439 commit 9719e0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/java/org/influxdb/dto/PointTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,15 @@ public void testAddFieldsFromPOJOWithPublicAttributes() {
@Test
public void testAddFieldsFromPOJOWithDefaultAnnotation() {
PojoWithDefaultAnnotation pojo = new PojoWithDefaultAnnotation();
PojoWithDefaultAnnotation pojo1 = new PojoWithDefaultAnnotation();
pojo.setAuthor("");
pojo.setId("1");
Point p = Point.measurementByPOJO(pojo.getClass()).addFieldsFromPOJO(pojo).build();
Assertions.assertEquals(pojo.getAuthor(),p.getFields().get("author"));
Assertions.assertEquals(pojo.getId(),p.getFields().get("id"));
//Completely separate pojo with different reference to compare against
pojo1.setAuthor("");
pojo1.setId("1");
Assertions.assertEquals(pojo1.getAuthor(),p.getFields().get("author"));
Assertions.assertEquals(pojo1.getId(),p.getFields().get("id"));
}

@Test
Expand Down

0 comments on commit 9719e0c

Please sign in to comment.