Skip to content

Commit

Permalink
Added broken tests for sphere grid (the next code changes will break …
Browse files Browse the repository at this point in the history
…one unit test, that potentially means that my implementation is not S.O.L.I.D)
  • Loading branch information
tirolo committed Jan 11, 2016
1 parent 4edfd91 commit 161b925
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Tirolo.CodeKata.PlutoRover.Tests/PlutoRoverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void Rover_Should_Move_Backward_And_Keep_Same_Heading_When_B_Command_Give

// Assert
var actualPlutoRoverPosition = plutoRover.ReportPosition();
var expectedPlutoRoverPosition = "0,-1,N";
var expectedPlutoRoverPosition = "0,-1,N"; // We will break this guy here :/ liskov wont be happy with it :P

Assert.AreEqual(expectedPlutoRoverPosition, actualPlutoRoverPosition);
}
Expand Down Expand Up @@ -121,5 +121,21 @@ public void Rover_Should_Be_At_0_0_W_When_FRFRFRFRL_Command_Given()

Assert.AreEqual(expectedRoverPosition, actualRoverPosition);
}

[Test]
public void Rover_Should_Move_On_The_Grid_As_A_Sphere()
{
// Arrange
Domain.PlutoRover plutoRover = new Domain.PlutoRover();

// Act
plutoRover.ExecuteCommand("BBLFRR");

// Assert
var actualRoverPosition = plutoRover.ReportPosition();
var expectedRoverPosition = "99,98,E";

Assert.AreEqual(expectedRoverPosition, actualRoverPosition);
}
}
}

0 comments on commit 161b925

Please sign in to comment.