public void When_At_Start_And_Facing_South_And_Move_Do_Not_Pass_Boundary() { var direction = new South(_landscape); direction.Move(); Assert.That(_landscape.CoordinateX, Is.EqualTo(0)); Assert.That(_landscape.CoordinateY, Is.EqualTo(0)); }
public void GivenDirectionSouth_WhenMove_ShouldYAxisDecremented() { var direction = new South(); var oldPosition = new Core.ValueObject.RoverPosition(3, 3, direction.Direction); var position = direction.Move(oldPosition); Assert.Equal(position.X, oldPosition.X); Assert.Equal(position.Y, oldPosition.Y - 1); }
public void moves_south() { var command = new South(11); var result = command.Move(StartingPosition); result.North.Should().Be(-10); result.East.Should().Be(1); result.Direction.Should().Be(Direction.E); }
public void Move_HeadedSouth_ResultsInPositionOneDown() { const int startX = 10; const int startY = 12; Direction sut = new South(); var moveResult = sut.Move(startX, startY); moveResult.x.Should().Be(startX); moveResult.y.Should().Be(startY - 1); }