public void ReadStartingCoordinate_pair_integer_input_should_return_Coordinate()
        {
            CommandReader SUT = new CommandReader(_mockView.Object);

            _mockView.Setup(x => x.ReadLine()).Returns("2000 3000");
            Coordinate result = SUT.ReadStartingCoordinate();

            Assert.AreEqual(2000, result.X);
            Assert.AreEqual(3000, result.Y);
        }
示例#2
0
        public void TestCoordinatesOK()
        {
            CommandReader test = new CommandReader(_mockView.Object, _mockRobotCleanerServices.Object);

            _mockView.Setup(x => x.ReadLine()).Returns("10 22");
            Coordinate result = test.ReadStartingCoordinate();

            Assert.AreEqual(10, result.X);
            Assert.AreEqual(22, result.Y);
        }