Skip to content

Instantly share code, notes, and snippets.

@igorstojanovski
Created September 10, 2024 20:56
Show Gist options
  • Save igorstojanovski/64bb7ac9ec617dec87519302e0db4ee5 to your computer and use it in GitHub Desktop.
Save igorstojanovski/64bb7ac9ec617dec87519302e0db4ee5 to your computer and use it in GitHub Desktop.
AssertJ assertion using extraction and tuples
List<User> users = getUsers();
assertThat(users)
.extracting("firstname", "lastname")
.containsExactlyInAnyOrder(
tuple("Jane", "Doe"),
tuple("Jiminy", "Cricket")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment