Ejemplo n.º 1
0
        public async Task ShouldFailValidationRobotNotOnTheTableTest()
        {
            var   leftCommand = new LeftCommand();
            Robot robot       = new Robot(Table.GetTableInstance());

            var result = await leftCommand.Excute(robot);

            result.ShouldBe(false);
        }
Ejemplo n.º 2
0
        public async Task ShouldSucceedTest(Direction from, Direction expected)
        {
            var   leftCommand = new LeftCommand();
            Robot robot       = new Robot(Table.GetTableInstance());

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

            var result = await leftCommand.Excute(robot);

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