public void GetAllNeighboringStatesTest()
        {
            // Act
            var result = CountryStateHelper.GetAllNeighboringStates();

            // Assert
            Assert.Equal(result.Count, NbOfCountryStates);
        }
        public void GetCountryStatesTestCodeNotNull()
        {
            // Act
            var result = CountryStateHelper.GetCountryStates();

            // Assert
            Assert.NotNull(result.First().Code);
        }
        public void GetNeighboringStatesInvalidState()
        {
            const string InvalidCountryState = "XX";
            // Act
            var result = CountryStateHelper.GetNeighboringStates(InvalidCountryState);

            // Assert
            Assert.Null(result);
        }
        public void GetNeighboringStatesMissouriTest()
        {
            const string  CountryStateCodeMissouri = "MO";
            List <string> NeighborStatesMissouri   = new List <string> {
                "AR", "IA", "IL", "KS", "KY", "NE", "OK", "TN"
            };
            // Act
            var result = CountryStateHelper.GetNeighboringStates(CountryStateCodeMissouri);

            // Assert
            Assert.Equal(result.NeighborCodes, NeighborStatesMissouri);
        }
        public void GetAllNeighboringStatesSortedNeighborsTest()
        {
            // Act
            var result = CountryStateHelper.GetAllNeighboringStates();

            // Assert
            foreach (var countryState in result)
            {
                Assert.Equal(countryState.NeighborCodes, countryState.NeighborCodes.OrderBy(x => x));
                output.WriteLine(countryState.NeighborCodes.Count + " neighbor states for " + countryState.Code);
            }
        }