Пример #1
0
 public void RemoveRepeatedSteps_ZeroLengthCommandList_ReturnEmptyList()
 {
     //Arrange
     char[] commands = "".ToCharArray();
     //Action
     char[] result = RoverHelper.RemoveRepeatedSteps(commands);
     //Assert
     Assert.Empty(result);
 }
Пример #2
0
 public void RemoveRepeatedSteps_CommandsListContainsRepetatedSteps_ReturnWithoutRepeteadSteps()
 {
     //Arrange
     char[] commands = "RRRRMMLLLLRRMRMRMRMMMLMRLMLMLMLM".ToCharArray();
     char[] expected = "MMRMMLMR".ToCharArray();
     //Action
     char[] result = RoverHelper.RemoveRepeatedSteps(commands);
     //Assert
     Assert.Equal(expected, result);
 }
Пример #3
0
 public void RemoveRepeatedSteps_RotateCommandsParameter_ReturnWithoutRotateParameters()
 {
     //Arrange
     char[] commands = "RRRRMMLLLLRR".ToCharArray();
     char[] expected = "MMRR".ToCharArray();
     //Action
     char[] result = RoverHelper.RemoveRepeatedSteps(commands);
     //Assert
     Assert.Equal(expected, result);
 }