I am using assertj's tuple to combine two or three property together and check the combination. Now I am having the issue of identifying out of which property it is failing.
Currently am using the as below:
softAssertions.assertThat(resultArrayList)
.extracting("title", "address.countryName", "address.state", "address.city")
.as("Title, CountryName, State, City at position %s", i)
.containsAnyOf(
new Tuple(placeToSearch, expectedCountry, expectedState, expectedCity));
and I get a failure message as
[Title, CountryName, State, City at position 0]
Expecting
<[("DOT Baires Shopping", "Argentina", "Ciudad Autónoma de Buenos Aires", "Ciudad de Buenos Aires")]>
to contain at least one of the following elements:
<[("Dot", "Argentina", "Ciudad Autónoma de Buenos Aires", "Ciudad de Buenos Aires")]>
1) Some suggestion to identify/mark the failed data. 2) Any way to colour the failed ones