Exemplo n.º 1
0
        public void Match_NonExistingKey_ReturnDefault()
        {
            var cardinalLookup = new CardinalLookup();

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

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

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

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