Exemple #1
0
 public void Process_ShouldThrowErrorIfTooManyArguments()
 {
     //Arrange
     _line = "4 5 6 7";
     _processStartingPosition = new ProcessStartingPosition(_line);
     //Act && Assert
     Assert.Throws <ArgumentException>(() =>
                                       _processStartingPosition.Process()
                                       );
 }
Exemple #2
0
        public void Process_ShouldReturnPosition()
        {
            //Arrange
            _line = "0 1 N";
            _processStartingPosition = new ProcessStartingPosition(_line);
            //Act
            var result = _processStartingPosition.Process();

            //Assert
            Assert.Equal(0, result.CurrentPosition.X);
            Assert.Equal(1, result.CurrentPosition.Y);
            Assert.Equal(DirectionEnum.North, result.Direction);
        }