コード例 #1
0
        public async Task ShouldFailValidationRobotNotOnTheTableTest()
        {
            var   rightCommand = new RightCommand();
            Robot robot        = new Robot(Table.GetTableInstance());

            var result = await rightCommand.Excute(robot);

            result.ShouldBe(false);
        }
コード例 #2
0
        public async Task ShouldSucceedTest(Direction from, Direction expected)
        {
            var   rightCommand = new RightCommand();
            Robot robot        = new Robot(Table.GetTableInstance());

            robot.SetPositionOnTable(new Position(0, 0, from));

            var result = await rightCommand.Excute(robot);

            result.ShouldBe(true);
            robot.Direction.ShouldBe(expected);
        }