Пример #1
0
 @Test
 public void testMissingResult() {
   Club gremio = TestFixtures.GREMIO;
   Club internacional = TestFixtures.INTERNACIONAL;
   Match match = Match.create(gremio, internacional);
   service.create(Arrays.asList(gremio, internacional));
   service.create(match);
   assertThat(service.query(AutoValueClasses.MATCH)).isEqualTo(Collections.singletonList(match));
 }
Пример #2
0
 @Test
 public void testMatches() {
   Goal goal = newGoal(1, TestFixtures.GREMIO);
   MatchResult matchResult =
       MatchResult.builder()
           .homeGoals(Collections.singletonList(goal))
           .awayGoals(Collections.emptyList())
           .build(TestFixtures.GREMIO, TestFixtures.INTERNACIONAL);
   Match match = Match.create(TestFixtures.GREMIO, TestFixtures.INTERNACIONAL, matchResult);
   service.create(Arrays.asList(TestFixtures.GREMIO, TestFixtures.INTERNACIONAL));
   service.create(match);
   assertThat(service.query(AutoValueClasses.MATCH)).isEqualTo(Collections.singletonList(match));
 }