Skip to content

Instantly share code, notes, and snippets.

@tadams
Created January 29, 2016 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadams/69108099358739e72338 to your computer and use it in GitHub Desktop.
Save tadams/69108099358739e72338 to your computer and use it in GitHub Desktop.
public class StoryTest2 {
@Test
public void shouldReturnHobbitCharacters() {
List<Character> characters = Arrays.asList(BILBO, SAM, ARAGORN, GANDALF, FRODO);
Story story = Story.builder().characters(characters).build();
Set<Character> storyHobbits = story.charactersOf(Race.HOBBIT);
assertThat(storyHobbits).containsOnly(BILBO, FRODO, SAM)
.extracting(Character::getRace)
.containsOnly(Race.HOBBIT);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment