Esempio n. 1
0
        public void SubmittingSurveyTest()
        {
            Survey survey = new Survey()
            {
                ParkCode      = "TE",
                Email         = "*****@*****.**",
                State         = "Ohio",
                ActivityLevel = "Xtreme",
            };

            //Adds park to avoid conflict with FOREIGN KEY constraint
            AddPark();
            //Adds custom survey to the list of current surveys
            _dao.AddSurvey(survey);

            //Creates list of all surveys with new survey added
            var surveyResults = _dao.GetSurveyResults();
            IList <SurveyResult> testResultList = new List <SurveyResult>();

            foreach (var result in surveyResults)
            {
                if (result.ParkCode == "TE")
                {
                    testResultList.Add(result);
                }
            }

            Assert.AreEqual(1, testResultList[0].NumberOfReviews);
            Assert.AreEqual("Tech Elevator", testResultList[0].ParkName);
        }
        public IActionResult SurveyResults()
        {
            IList <SurveyResult> surveyResultList = _db.GetSurveyResults();

            return(GetAuthenticatedView("SurveyResults", surveyResultList));
        }
Esempio n. 3
0
        public IActionResult FavoriteParks()
        {
            IList <SurveyResult> surveyResults = _dao.GetSurveyResults();

            return(GetAuthenticatedView("FavoriteParks", surveyResults));
        }