コード例 #1
0
        public void ValidateTestThrowsNullReferenceException259()
        {
            char c;
            GameWinnerService s0 = new GameWinnerService();

            c = this.ValidateTest(s0, (char[, ])null);
        }
        public char ValidateTest([PexAssumeUnderTest] GameWinnerService target, char[,] gameBoard)
        {
            char result = target.Validate(gameBoard);

            return(result);
            // TODO: add assertions to method GameWinnerServiceTest.ValidateTest(GameWinnerService, Char[,])
        }
コード例 #3
0
        public void ValidateTestThrowsIndexOutOfRangeException552()
        {
            char c;
            GameWinnerService s0 = new GameWinnerService();

            char[,] cs = new char[1, 2];
            c          = this.ValidateTest(s0, cs);
        }
コード例 #4
0
        public void ValidateTest114()
        {
            char c;
            GameWinnerService s0 = new GameWinnerService();

            char[,] cs = new char[1, 3];
            c          = this.ValidateTest(s0, cs);
            PexAssert.AreEqual <char>(' ', c);
            PexAssert.IsNotNull((object)s0);
        }
コード例 #5
0
        public void NeitherPlayerHasThreeInArrow()
        {
            IGameWinnerService gameWinnerService;

            gameWinnerService = new GameWinnerService();
            const char expected  = ' ';
            var        gameBoard = new char[3, 3] {
                { ' ', ' ', ' ' },
                { ' ', ' ', ' ' },
                { ' ', ' ', ' ' }
            };
            var actual = gameWinnerService.Validate(gameBoard);

            Assert.AreEqual(expected, actual);
        }
        public void PlayerWithAllSpacesInTopRowIsWinner()
        {
            IGameWinnerService gameWinnerService;

            gameWinnerService = new GameWinnerService();
            const char expected  = 'X';
            var        gameBoard = new char[3, 3] {
                { expected, expected, expected },
                { ' ', ' ', ' ' },
                { ' ', ' ', ' ' }
            };
            var actual = gameWinnerService.Validate(gameBoard);

            Assert.AreEqual(expected.ToString(), actual.ToString());
        }