Exemplo n.º 1
0
        public void CreatesEmptySeasonResultFromInvalidIntParams()
        {
            ISeasonResult result;
            var           sut = new SeasonResultFactory(_mockLoggingService.Object);

            bool success = sut.TryCreate("abc", -1, 3, out result);

            Assert.False(success);
            Assert.Equal(SeasonResult.EmptySeasonResult, result);
        }
Exemplo n.º 2
0
        public void CreatesSeasonResultFromValidIntParams()
        {
            ISeasonResult result;
            var           sut = new SeasonResultFactory(_mockLoggingService.Object);

            bool success = sut.TryCreate("abc", 2, 3, out result);

            Assert.True(success);
            Assert.Equal("abc", result.Team);
            Assert.Equal(2, result.GoalsFor);
            Assert.Equal(3, result.GoalsAgainst);
        }