Пример #1
0
        public void Match_NonExistingKey_ReturnDefault()
        {
            var cardinalLookup = new CardinalLookup();

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

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

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

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