Beispiel #1
0
        public void Match_NonExistingKey_ReturnDefault()
        {
            var cardinalLookup = new CardinalLookup();

            cardinalLookup.Load();
            var country = cardinalLookup.Match(5);

            Assert.That(country, Is.EqualTo("Unknown"));
        }
Beispiel #2
0
        public void Match_ExistingKey_ReturnValue()
        {
            var cardinalLookup = new CardinalLookup();

            cardinalLookup.Load();
            var country = cardinalLookup.Match(1);

            Assert.That(country, Is.EqualTo("North"));
        }
Beispiel #3
0
 public void GivenASouthFacingCardinal_When_ATurnLeftIsMade_ThenCardinalFacesEast()
 {
     Assert.Equal(Cardinal.East, CardinalLookup.SetDirection(Cardinal.South, DirectionTurn.Left));
 }
Beispiel #4
0
 public void GivenAEastFacingCardinal_WhenATurnRightIsMade_ThenCardinalFacesSouth()
 {
     Assert.Equal(Cardinal.South, CardinalLookup.SetDirection(Cardinal.East, DirectionTurn.Right));
 }
Beispiel #5
0
 public void GivenAEastFacingCardinal_WhenATurnLeftIsMade_ThenCardinalFacesNorth()
 {
     Assert.Equal(Cardinal.North, CardinalLookup.SetDirection(Cardinal.East, DirectionTurn.Left));
 }
Beispiel #6
0
 public void GivenANorthFacingCardinal_WhenATurnLeftIsMade_ThenCardinalFacesWest()
 {
     Assert.Equal(Cardinal.East, CardinalLookup.SetDirection(Cardinal.North, DirectionTurn.Right));
 }