Skip to content

Instantly share code, notes, and snippets.

@tadams
Created January 29, 2016 04:27
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/3d6b09115a052a099794 to your computer and use it in GitHub Desktop.
Save tadams/3d6b09115a052a099794 to your computer and use it in GitHub Desktop.
public class StoryTest3 {
@Test
public void shouldReturnHobbitCharacters() {
List<Character> characters = new TestCharacterData().fellowshipOfTheRing();
Story story = Story.builder().characters(characters).build();
Set<Character> fellowshipOfRingHobbits = story.charactersOf(Race.HOBBIT);
assertThat(fellowshipOfRingHobbits).containsOnly(FRODO, SAM, MERRY, PIPPIN)
.extracting(Character::getRace)
.containsOnly(Race.HOBBIT);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment