コード例 #1
0
        public async void Task_CarregarTurmasProfessor_OkObjectResult()
        {
            //Arrange
            var controller = new PlanejamentoController(_db);
            //Act
            var resulTask = await controller.CarregarTurmasProfessor("username");

            //Assert
            Assert.IsType <OkObjectResult>(resulTask.Result);
        }
コード例 #2
0
        public async void Task_ListarODS_OkObjetctResult()
        {
            //Arrange
            var controller = new PlanejamentoController(_db);

            //Act
            var resulTask = await controller.ListarODS();

            //Assert
            Assert.IsType <OkObjectResult>(resulTask.Result);
        }
コード例 #3
0
        public async void Task_ListarObjetivosAprendizagemAno_OkObjectResult()
        {
            //Arrange
            var controller = new PlanejamentoController(_db);

            //Act
            var resulTask = await controller.ListarObjetivosAprendizagem("2019");

            //Assert
            Assert.IsType <OkObjectResult>(resulTask.Result);
        }
コード例 #4
0
        public async void Task_Sondagem_NotFoundResult()
        {
            //Arrange
            var           controller = new PlanejamentoController(_db);
            PlanningModel model      = new PlanningModel();
            //Act
            ActionResult <string> resulTask = await controller.CarregarAlunosSondagem(model);

            //Assert
            Assert.IsType <NotFoundResult>(resulTask.Result);
        }
コード例 #5
0
        public async void Task_CarregarAlunosMock_NotFoundResult()
        {
            //Arrange
            var           controller = new PlanejamentoController(_db);
            PlanningModel model      = new PlanningModel();
            //Act
            var resulTask = await controller.CarregarAlunosMock(model);

            //Assert
            Assert.IsType <NotFoundResult>(resulTask.Result);
        }
コード例 #6
0
        [Fact]//TODO:  fazer ajustes Task_AbrirCalendarioAula_NotFoundResult
        public async void Task_AbrirCalendarioAula_NotFoundResult()
        {
            //Arrange
            var controller           = new PlanejamentoController(_db);
            ClassScheduleModel model = new ClassScheduleModel();
            //Act
            var resulTask = await controller.AbrirCalendarioAula(model);

            //Assert
            Assert.IsType <NotFoundResult>(resulTask.Result);
        }
コード例 #7
0
        public async void Task_AbrirPlanoAnual_NotFoundResult()
        {
            //Arrange
            var           controller = new PlanejamentoController(_db);
            PlanningModel model      = new PlanningModel();
            //Act
            var resulTask = await controller.AbrirPlanoAnual(model);

            //Assert
            Assert.IsType <NotFoundResult>(resulTask.Result);
        }
コード例 #8
0
        public void TestOK()
        {
            //Arrange
            var controller = new PlanejamentoController(db);
            var testOK     = true;
            //Act
            //var result = controller.Test(testOK);
            var result = false;

            //Assert
            Assert.True(result);
        }
コード例 #9
0
        public async void Task_ListarObjetivosAprendizagem_Result()
        {
            //Arrange
            _db = new SMEContext(dbContextOptions);
            var controller = new PlanejamentoController(_db);

            //Act
            var resulTask = await controller.ListarObjetivosAprendizagem();

            //Assert
            Assert.IsType <string>(resulTask.Value);
        }
コード例 #10
0
        public async void Task_CalendarioAnoLetivo_OkObjectResult()
        {
            //Arrange
            _db = new SMEContext(dbContextOptions);
            var controller = new PlanejamentoController(_db);

            //Act
            var resulTask = await controller.CalendarioAnoLetivo("", 2019);

            //Assert
            Assert.IsType <OkObjectResult>(resulTask.Result);
        }
コード例 #11
0
        public async void Task_AbrirPlanoCiclo_NotFoundResult()
        {
            //Arrange

            var   controller = new PlanejamentoController(_db);
            Cycle model      = new Cycle();

            //Act
            var resulTask = await controller.AbrirPlanoCiclo(model);

            //Assert
            Assert.IsType <NotFoundResult>(resulTask.Result);
        }
コード例 #12
0
        public async void Task_MigrarConteudo_500Result()
        {
            //Arrange
            var controller = new PlanejamentoController(_db);
            CopyClassScheduleModel model = new CopyClassScheduleModel();

            //Act
            ActionResult <string> resulTask = await controller.MigrarConteudo(model);

            StatusCodeResult status = Assert.IsType <StatusCodeResult>(resulTask.Result);

            //Assert
            Assert.Equal(500, status.StatusCode);
        }
コード例 #13
0
        [Fact]//TODO fazer o teste da abertura de um plano de ciclo, falta passar parâmetros corretos
        public async void Task_AbrirPlanoCiclo_OkObjectResult()
        {
            //Arrange
            _db = new SMEContext(dbContextOptions);
            var   controller = new PlanejamentoController(_db);
            Cycle model      = new Cycle();

            model.School = "Escola";
            model.Type   = CycleTypes.Alfabetizacao;
            //Act
            var resulTask = await controller.AbrirPlanoCiclo(model);

            //Assert
            Assert.IsType <OkObjectResult>(resulTask.Result);
        }
コード例 #14
0
        public async void Task_AbrirCalendarioAula_OkObjectResult()
        {
            //Arrange
            var controller           = new PlanejamentoController(_db);
            ClassScheduleModel model = new ClassScheduleModel();

            model.Username  = "";
            model.School    = "";
            model.Year      = DateTime.Now.Year;
            model.Classroom = "";
            //Act
            var resulTask = await controller.AbrirCalendarioAula(model);

            //Assert
            Assert.IsType <OkObjectResult>(resulTask.Result);
        }
コード例 #15
0
        [Fact]//TODO: fazer ajustes Task_AbrirPlanoAnual_OkObjectResult
        public async void Task_AbrirPlanoAnual_OkObjectResult()
        {
            //Arrange
            _db = new SMEContext(dbContextOptions);
            var           controller = new PlanejamentoController(_db);
            PlanningModel model      = new PlanningModel();

            model.Username  = "";
            model.School    = "";
            model.Year      = DateTime.Now.Year;
            model.Classroom = "";
            //Act
            var resulTask = await controller.AbrirPlanoAnual(model);

            //Assert
            Assert.IsType <OkObjectResult>(resulTask.Result);
        }