public void Scenario_GetUserScenario_Test()
        {
            //Arrange
            IScenarioDAL dao = new ScenarioDAL(ConnectionString);

            //Action
            Scenario userScenario = dao.GetUserScenario(1);

            //Assert
            Assert.AreEqual(userScenario.Id, 1);
        }
        public void Scenario_CreateScenario_Test()
        {
            //Arrange
            IScenarioDAL dao = new ScenarioDAL(ConnectionString);

            //Action
            bool isAdded = dao.CreateScenario("test", "testing", "testImage", "testQuestion", 1);

            //Assert
            Assert.IsTrue(isAdded);
        }
        public void Scenario_SaveReview_Test()
        {
            //Arrange
            IScenarioDAL dao     = new ScenarioDAL(ConnectionString);
            bool         isAdded = false;


            //Action
            isAdded = dao.SaveReview(1, 1);
            //Assert
            Assert.IsTrue(isAdded);
        }
        public void Scenario_GetScenarioAnswers_Test()
        {
            //Arrange
            IScenarioDAL  dao     = new ScenarioDAL(ConnectionString);
            List <Answer> answers = dao.GetScenarioAnswers(3);

            //Action
            Answer testAnswer = answers[0];

            //Assert
            Assert.AreEqual(testAnswer.AnswerId, 7);
        }
        public void Scenario_GetResponse_Test()
        {
            //Arrange
            IScenarioDAL dao      = new ScenarioDAL(ConnectionString);
            bool         newScene = dao.SaveReview(1, 1);

            //Action
            Answer newAnswer = dao.GetResponse(1);

            //Assert
            Assert.AreEqual("A) Sure", newAnswer.AnswerText);
        }
        public void Scenario_GetAllScenarios_Test()
        {
            //Arrange
            IScenarioDAL     dao      = new ScenarioDAL(ConnectionString);
            IList <Scenario> testList = new List <Scenario>();

            testList = dao.GetAllScenarios();
            //Action
            int results = GetRowCount("scenarios");

            //Assert
            Assert.AreEqual(results, testList.Count);
        }
        public void Scenario_GetReview_Test()
        {
            //Arrange
            IScenarioDAL dao = new ScenarioDAL(ConnectionString);

            bool nextScenario = dao.SaveReview(1, 1);


            //Action
            List <Review> testList = new List <Review>();

            testList = dao.GetReview(1);

            //Assert
            Assert.AreEqual(1, testList.Count);
        }
        public void Scenario_GetAllUserScenarios_Test()
        {
            //Arrange
            IAssignmentDAL assignmentDAO = new AssignmentDAL(ConnectionString);

            assignmentDAO.AssignScenario(1, 1);

            IScenarioDAL     dao      = new ScenarioDAL(ConnectionString);
            IList <Scenario> testList = new List <Scenario>();

            testList = dao.GetAllUserScenarios(1);

            //Action
            int result = 1;

            //Assert
            Assert.AreEqual(result, testList.Count);
        }
        public void Scenario_GetNextScenario_Test()
        {
            //Arrange
            IAssignmentDAL assignmentDAO = new AssignmentDAL(ConnectionString);

            assignmentDAO.AssignScenario(1, 1);

            assignmentDAO.AssignScenario(1, 3);


            IScenarioDAL dao = new ScenarioDAL(ConnectionString);

            Scenario nextScenario = dao.GetNextScenario(1, 1);


            //Action
            int id = 3;

            //Assert
            Assert.AreEqual(id, nextScenario.Id);
        }