public void Given_NoScoreValues_When_GetGoalsAgainst_Then_ZeroIsReturned() { //Act var teamLiverpool = new Team { Name = "Liverpool" }; var teamChelsea = new Team { Name = "Chelsea" }; var match = new TeamLeagueMatch { MatchEntries = new List <TeamMatchEntry> { new TeamMatchEntry { Team = teamLiverpool, Score = new IntegerScore() }, new TeamMatchEntry { Team = teamChelsea, Score = new IntegerScore() } } }; //Assert match.GetGoalsAgainst(teamLiverpool).Should().Be(0); }
public void Given_ScoreForOpponentIsSet_When_GetGoalsAgainst_Then_GoalsForOpponentAreReturned() { //Act var teamLiverpool = new Team { Name = "Liverpool" }; var teamChelsea = new Team { Name = "Chelsea" }; var match = new TeamLeagueMatch { MatchEntries = new List <TeamMatchEntry> { new TeamMatchEntry { Team = teamLiverpool, Score = new IntegerScore { Value = 2 } }, new TeamMatchEntry { Team = teamChelsea, Score = new IntegerScore { Value = 1 } } } }; //Assert match.GetGoalsAgainst(teamLiverpool).Should().Be(1); }
public void Given_NoMatchEntries_When_GetGoalsAgainst_Then_ZeroIsReturned() { //Act var teamLiverpool = new Team { Name = "Liverpool" }; var teamChelsea = new Team { Name = "Chelsea" }; var match = new TeamLeagueMatch(); //Assert match.GetGoalsAgainst(teamLiverpool).Should().Be(0); }