public void GetSingleParkTest() { //Arrange IParkDao parksDoa = new ParkDao(_connectionString); //Act Park testpark = parksDoa.GetSinglePark("zzz"); //Assert Assert.AreEqual("Test Park", testpark.ParkName); }
public void GetParkTest() { //Arrange IParkDao parksDoa = new ParkDao(_connectionString); //Act IList <Park> parks = parksDoa.GetAllParks(); //Assert Assert.AreEqual(_myPark, parks.Count); Assert.AreEqual("ZZZ", parks[parks.Count - 1].ParkCode); }
private List <SelectListItem> GetParksList() { IParkDao parkDao = new ParkDao(Startup.ConnectionString); List <SelectListItem> parks = new List <SelectListItem>(); foreach (Park park in parkDao.GetAllParks()) { parks.Add(new SelectListItem(park.ParkName, park.ParkCode)); } return(parks); }
public void WeatherTest() { //Arrange IParkDao parksDoa = new ParkDao(_connectionString); //Act List <Weather> testweather = parksDoa.GetWeather("zzz"); //Assert Assert.AreEqual(_myWeather, testweather.Count); Assert.AreEqual("Ice", testweather[0].Forecast); Assert.AreEqual("Fire", testweather[1].Forecast); Assert.AreEqual("Nice", testweather[2].Forecast); Assert.AreEqual("Nice", testweather[3].Forecast); Assert.AreEqual("Hot", testweather[4].Forecast); }