Skip to content

Instantly share code, notes, and snippets.

@tadams
Last active January 29, 2016 04:24
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/d65f2c68ef06c1c87d35 to your computer and use it in GitHub Desktop.
Save tadams/d65f2c68ef06c1c87d35 to your computer and use it in GitHub Desktop.
public class StoryTest1 {
@Test
public void shouldReturnHobbitCharacters() {
List<Character> characters = new TestCharacterData().createList();
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