我做了一个简单的测试: Person p = new Person();
p.setFirstName("Stéphane");
p.setLastName("Traumat");
assertThat(p)
.extracting("firstName", "lastName")
.contains(tuple("Stéphane", "Traumat"));
我也得到一个奇怪的
相关How to compare recursively ignoring given fields using assertJ? 作为解决该问题,我试图钻机,我不想比较比较领域的比较,并使其返回0 assertThat(service.postComment(12,234,comment)).usingComparatorForFields((a,b)->0,"startDate").isEqu