public void Match_NonExistingKey_ReturnDefault() { var cardinalLookup = new CardinalLookup(); cardinalLookup.Load(); var country = cardinalLookup.Match(5); Assert.That(country, Is.EqualTo("Unknown")); }
public void Match_ExistingKey_ReturnValue() { var cardinalLookup = new CardinalLookup(); cardinalLookup.Load(); var country = cardinalLookup.Match(1); Assert.That(country, Is.EqualTo("North")); }
public void GivenASouthFacingCardinal_When_ATurnLeftIsMade_ThenCardinalFacesEast() { Assert.Equal(Cardinal.East, CardinalLookup.SetDirection(Cardinal.South, DirectionTurn.Left)); }
public void GivenAEastFacingCardinal_WhenATurnRightIsMade_ThenCardinalFacesSouth() { Assert.Equal(Cardinal.South, CardinalLookup.SetDirection(Cardinal.East, DirectionTurn.Right)); }
public void GivenAEastFacingCardinal_WhenATurnLeftIsMade_ThenCardinalFacesNorth() { Assert.Equal(Cardinal.North, CardinalLookup.SetDirection(Cardinal.East, DirectionTurn.Left)); }
public void GivenANorthFacingCardinal_WhenATurnLeftIsMade_ThenCardinalFacesWest() { Assert.Equal(Cardinal.East, CardinalLookup.SetDirection(Cardinal.North, DirectionTurn.Right)); }