public void SaveSurveyAddsANewSurvey()
        {
            Survey survey2 = new Survey();

            survey2.ActivityLevel = "Sedentary";
            survey2.Email         = "*****@*****.**";
            survey2.ParkCode      = "AAAA";
            survey2.State         = "Ohio";
            SurveySqlDAO surveyDAO        = new SurveySqlDAO(ConnectionString);
            int          startingRowCount = GetRowCount("survey_result");

            surveyDAO.SaveSurvey(survey2);
            int endingRowCount = GetRowCount("survey_result");

            Assert.AreNotEqual(startingRowCount, endingRowCount);
        }
Example #2
0
        public void SaveSurvey_Should_Return1Moresurvey()
        {
            SurveySqlDAO dao          = new SurveySqlDAO(ConnectionString);
            int          startingRows = GetRowCount("survey_result");
            SurveyForm   survey       = new SurveyForm();

            survey.ParkCode      = ParkCode;
            survey.Email         = "*****@*****.**";
            survey.State         = "OH";
            survey.ActivityLevel = "Active";

            dao.SaveSurvey(survey);
            int endingRows = GetRowCount("survey_result");

            Assert.AreEqual(startingRows + 1, endingRows);
        }