Esempio n. 1
0
        public void TestCanAction_5()
        {
            var         mock  = new Mock <IActionValidator>();
            IActionable robot = new TableRobot(mock.Object);

            Assert.AreEqual(false, robot.CanAction(ActionType.REPORT), "Report action cannot be taken before the robot gets placed onto the table.");
        }
Esempio n. 2
0
        public void TestCanAction_1()
        {
            var         mock  = new Mock <IActionValidator>();
            IActionable robot = new TableRobot(mock.Object);

            Assert.AreEqual(true, robot.CanAction(ActionType.PLACE), "Place action can always be taken.");
        }
Esempio n. 3
0
        public void TestCanAction_9()
        {
            IActionable robot = new TableRobot(new FiveByFiveTableActionValidator());

            robot.Place(0, 0, Facing.NORTH);

            Assert.AreEqual(true, robot.CanAction(ActionType.REPORT), "Report action can be taken after the robot gets placed onto the table.");
        }
Esempio n. 4
0
        public void TestCanAction_9()
        {
            var mock = new Mock <IActionValidator>();

            mock.Setup(m => m.Validate(It.IsAny <int>(), It.IsAny <int>())).Returns(true);
            IActionable robot = new TableRobot(mock.Object);

            robot.Place(0, 0, Facing.NORTH);

            Assert.AreEqual(true, robot.CanAction(ActionType.REPORT), "Report action can be taken after the robot gets placed onto the table.");
        }
Esempio n. 5
0
        public void TestCanAction_5()
        {
            IActionable robot = new TableRobot(new FiveByFiveTableActionValidator());

            Assert.AreEqual(false, robot.CanAction(ActionType.REPORT), "Report action cannot be taken before the robot gets placed onto the table.");
        }
Esempio n. 6
0
        public void TestCanAction_1()
        {
            IActionable robot = new TableRobot(new FiveByFiveTableActionValidator());

            Assert.AreEqual(true, robot.CanAction(ActionType.PLACE), "Place action can always be taken.");
        }