public void GetStationCounts_EmptyState() { NrelClient client = new NrelClient(); GeoLocation location = new GeoLocation() { City = "Detroit", State = "" }; StationCounts counts = client.GetStationCountsByGeoLocation(location); Assert.That(counts, Is.Not.Null); }
public void GetStationCounts() { NrelClient client = new NrelClient(); GeoLocation location = new GeoLocation() { City = "Detroit", State = "Michigan" }; StationCounts counts = client.GetStationCountsByGeoLocation(location); Assert.That(counts.Ports, Is.Not.Empty); Assert.That(counts.Stations, Is.Not.Empty); }
public void GetStationCounts_NonExistingCityAndState() { NrelClient client = new NrelClient(); GeoLocation location = new GeoLocation() { City = "abc", State = "def" }; try { StationCounts counts = client.GetStationCountsByGeoLocation(location); Assert.That(false); } catch (Exception e) { Assert.That(e.Message, Is.EqualTo("Cannot perform runtime binding on a null reference")); } }