public void GetAllCityStates_NeverReturnsNull() { var result = Zip2City.GetAllCityStates("99999"); Assert.IsNotNull(result); Console.WriteLine(JsonSerializer.Serialize(new string[0][])); }
public void GetAllCityStates_ForExistentZipCode_ReturnsOneOrMoreSets() { var result = Zip2City.GetAllCityStates("75261"); Assert.IsInstanceOfType(result, typeof(IEnumerable <string[]>)); foreach (var cityState in result) { Assert.IsNotNull(cityState[0], "It should have a city name."); Assert.AreEqual(2, cityState[1].Length, "It should be a state code"); } Console.WriteLine(JsonSerializer.Serialize(result)); }