コード例 #1
0
  @Test
  public void findsAndReturnsAllTrophiesForAGivenGameType() {
    final Collection<Trophy> trophies = underTest.findForGameType(GAME_TYPE);

    assertThat(trophies.size(), is(equalTo(2)));
    assertThat(trophies, hasItem(TROPHY1));
    assertThat(trophies, hasItem(TROPHY2));
  }
コード例 #2
0
  @Test
  public void findsAndReturnsEmptyCollectionIfNoTrophiesArePossessedByAGivenGameType() {
    final Collection<Trophy> trophies = underTest.findForGameType(GAME_TYPE_WITHOUT_TROPHIES);

    assertThat(trophies.size(), is(equalTo(0)));
  }