コード例 #1
0
        public void TareaDetaislNotNull()
        {
            // Arrange
            TareaController tarea = new TareaController();

            // Act
            ViewResult result = tarea.TareaDetails(1) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
コード例 #2
0
        public void TareaCreatelValid()
        {
            // Arrange
            TareaController tarea = new TareaController();

            // Act
            ViewResult result = tarea.TareaCreate() as ViewResult;

            // Assert
            Assert.IsNotNull(result.ViewBag.curso);
        }
コード例 #3
0
        public void TareaIndexNotNull()
        {
            // Arrange
            TareaController tarea = new TareaController();

            // Act
            ViewResult result = tarea.TareaIndex() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
コード例 #4
0
        public void TareaCreateModelNotNull()
        {
            // Arrange
            TareaController tarea = new TareaController();

            // Act
            ViewResult result = tarea.TareaCreate(new Models.TAREA
            {
                Enunciado = "nuevo", Entrega = new DateTime(2019, 08, 22), curso = 1, ponderacion = 0
            }
                                                  ) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }