Exemplo n.º 1
0
        public void SaveSurveyTest()
        {
            ParkWeatherSqlDal dal    = new ParkWeatherSqlDal(connectionString);
            Survey            survey = new Survey()
            {
                ParkCode      = "ABC",
                EmailAddress  = "",
                State         = "",
                ActivityLevel = ""
            };

            bool tableAffected = dal.SaveSurvey(survey);

            Assert.AreEqual(true, tableAffected);
        }
Exemplo n.º 2
0
        public void MostPopParkBySurveyTest()
        {
            ParkWeatherSqlDal dal    = new ParkWeatherSqlDal(connectionString);
            Survey            survey = new Survey()
            {
                ParkCode      = "ABC",
                EmailAddress  = "",
                State         = "",
                ActivityLevel = ""
            };

            for (int i = 0; i < numRowsInSurveyTable + 1; i++)
            {
                dal.SaveSurvey(survey);
            }
            Park testPark = dal.MostPopularBySurvey();

            Assert.AreEqual("ABC", testPark.ParkCode);
        }