4

I made a simple test :

Person p = new Person();
p.setFirstName("Stéphane");
p.setLastName("Traumat");

assertThat(p)
.extracting("firstName", "lastName")
.contains(tuple("Stéphane", "Traumat"));

And I get a strange result :

java.lang.AssertionError: 
Expecting:
<["Stéphane", "Traumat"]>
to contain:
<[("Stéphane", "Traumat")]>
but could not find:
<[("Stéphane", "Traumat")]>

Anyone can help me ?

1 Answers1

4

Don't use a tuple, the result of extracting in your case is a simple array, please also have a look at the javadoc for extracting, it contains an example showing how to use it.

Joel Costigliola
  • 6,308
  • 27
  • 35