Пример #1
0
        public void MoveCommRight_When_NewDesk_Then_RightMoving()
        {
            var  desk        = _helper.GenerateDesk(4);
            var  moveCommand = new MoveDownCommand(desk);
            bool res         = moveCommand.Execute();

            Assert.True(res);
        }
Пример #2
0
        public void MoveLeftCommand_When_NewDesk_Then_DeskDoesntChange()
        {
            var newDesk     = _helper.GenerateDesk(4);
            var desk        = _helper.GenerateDesk(4);
            var moveCommand = new MoveLeftCommand(desk);

            moveCommand.Execute();

            Assert.Equal(newDesk.GetDesk(), desk.GetDesk());
        }
Пример #3
0
        public void MoveDownCommand_When_NewDesk_Then_DeskMoving()
        {
            var newDesk     = _helper.GenerateDesk(4);
            var desk        = _helper.GenerateDesk(4);
            var moveCommand = new MoveDownCommand(desk);

            moveCommand.Execute();

            Assert.NotEqual(newDesk.GetDesk(), desk.GetDesk());
        }
Пример #4
0
        public void SimpleWinChecker_When_UncorrectDesk_Then_FalseResult()
        {
            var desk        = _helper.GenerateDesk(4);
            var moveCommand = new MoveDownCommand(desk);

            moveCommand.Execute();
            desk.SetWinner(new SimpleWinChecker());
            bool res = desk.IsInWinPosition();

            Assert.False(res);
        }