Exemplo n.º 1
0
 public void TestFacadeInitialization()
 {
     var robot = new Mock<IRobot>();
     var facade = new RobotFacade(robot.Object);
     facade.Initialize("99", "150", "240");
     robot.Verify(x => x.Initialize(99, 150, 240), Times.Once);
 }
Exemplo n.º 2
0
        public static void Run(IConsoleWrapper console)
        {
            var robot = new RobotFacade(new Robot());
            var lifetime = console.ReadLine();
            var startPos = console.ReadLine().Split(' ');
            robot.Initialize(lifetime, startPos[0], startPos[1]);
            while (!robot.IsDone())
            {
                var next = console.ReadLine().Split(' ');
                robot.Move(next[0], next[1]);
            }

            console.WriteLine("=> Cleaned: " + robot.NumberOfUniqueVisitedFields);
        }