我做了一個簡單的測試: 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