Пример #1
0
 public void UpdateScore()
 {
     Assert.IsTrue(_scoreBoard.UpdateScore(1, 2, 0));
     Assert.IsTrue(_scoreBoard.UpdateScore(1, 3, 1));
     Assert.IsTrue(_scoreBoard.UpdateScore(2, 1, 0));
     Assert.IsTrue(_scoreBoard.UpdateScore(3, 1, 1));
     Assert.IsFalse(_scoreBoard.UpdateScore(4, 2, 0));
 }
Пример #2
0
        public void UpdateScore_True(string homeTeamName, string awayTeamName, DateTime startDate)
        {
            var match = _scoreBoardService.StartMatch(homeTeamName, awayTeamName, startDate);

            Assert.NotNull(match);

            var updatedMatch = _scoreBoardService.UpdateScore(match.Id, 1, 0);

            Assert.Equal(1, updatedMatch.HomeTeam.Score);
            Assert.Equal(0, updatedMatch.AwayTeam.Score);
        }