public void GivenANegativeYPosition_WhenProcessing_ThenWillAddDrone() { var handler = new DronePositionLineHandler(); handler.Process(_contextMock.Object, "0 -1 N"); _contextMock.Verify(x => x.AddDrone(It.IsNotNull <Drone>()), Times.Once()); }
public void GivenAValidConfigurationWithExtraWhitespaces_WhenProcessing_ThenWillAddDrone() { var handler = new DronePositionLineHandler(); handler.Process(_contextMock.Object, " 1 1 N "); _contextMock.Verify(x => x.AddDrone(It.IsNotNull <Drone>()), Times.Once()); }
public void GivenAnInvalidCasingOrientation_WhenProcessing_ThenWillThrowFormatException() { var handler = new DronePositionLineHandler(); Assert.That(() => handler.Process(_contextMock.Object, "0 0 n"), Throws.InstanceOf <FormatException>()); }
public void GivenANonIntegerXPosition_WhenProcessing_ThenWillThrowFormatException() { var handler = new DronePositionLineHandler(); Assert.That(() => handler.Process(_contextMock.Object, "a 0 N"), Throws.InstanceOf <FormatException>()); }