Exemple #1
0
        public async Task ShouldReportRobotLocationOnTable()
        {
            var robot   = new Robot(Table.GetTableInstance());
            var command = new ReportCommand();
            var result  = await command.Excute(robot);

            result.ShouldBe(null);
        }
Exemple #2
0
        public async Task ShouldNOTReportRobotNOTOnTable()
        {
            // Setup
            var robot = new Robot(Table.GetTableInstance());

            // Set up a location for robot
            robot.SetPositionOnTable(new Position(2, 3, Direction.WEST));

            // Execute
            var command = new ReportCommand();
            var result  = await command.Excute(robot);

            // Validate
            result.XEastWestAxis.ShouldBe(2);
            result.YNorthSouthAxis.ShouldBe(3);
            result.Direction = Direction.WEST;
        }