public void GetAllSurveysTest() { ParkServiceSqlDAL test = new ParkServiceSqlDAL(_connectionString); List <SurveyResultModel> testSurveys = test.GetAllSurveys(); Assert.IsNotNull(testSurveys); }
public void GetSingleParkTest() { ParkServiceSqlDAL test = new ParkServiceSqlDAL(_connectionString); Park testPark = test.GetSinglePark(parkID); Assert.IsNotNull(testPark); }
public void GetAllParksTest() { ParkServiceSqlDAL test = new ParkServiceSqlDAL(_connectionString); List <Park> parkList = test.GetAllParks(); Assert.AreEqual(_numberOfParks, parkList.Count);//retrieved the number of rows beforehand to compare to the count in the returned list }
public void GetForecastByParkCodeTest() { ParkServiceSqlDAL test = new ParkServiceSqlDAL(_connectionString); List <Park> parkList = test.GetAllParks(); Park firstPark = parkList[0]; string parkID = firstPark.ParkCode; List <Weather> forecast = test.GetForecastByParkCode(parkID); Assert.IsNotNull(forecast); }
public void SaveNewSurveyTest() { ParkServiceSqlDAL test = new ParkServiceSqlDAL(_connectionString); Survey survey = new Survey(); survey.ActivityLevel = "active"; survey.Email = "*****@*****.**"; survey.ParkCode = parkID; survey.State = "OH"; bool worked = test.SaveNewSurvey(survey); Assert.IsTrue(worked); }