예제 #1
0
        public void WeergevenHuidigeWeek()
        {
            //Arrange
            MockAgent mockAgent = new MockAgent();
            var       target    = new CursusController(mockAgent);

            //Act
            var result = target.Index();

            //Assert
            Assert.IsInstanceOfType(result, typeof(IActionResult));
        }
예제 #2
0
        public void IndexReturnsCorrectIActionResult()
        {
            // Arrange
            int year       = 2014;
            int weeknumber = 42;

            CursusController cursusController = new CursusController(_casService, _cursusFileParser);

            // Act
            var target = cursusController.Index(year, weeknumber);

            // Assert
            Assert.IsInstanceOfType(target, typeof(ViewResult));
        }
예제 #3
0
        public void WeergevenGekozenWeekModelCheckContent()
        {
            //Arrange
            MockAgent mockAgent = new MockAgent();
            var       target    = new CursusController(mockAgent);

            //Act
            var result = target.Index(40, 2016);

            //Assert
            var resultModel = (result as ViewResult).Model;

            Assert.IsInstanceOfType(resultModel, typeof(IEnumerable <CursusInstantie>));
            Assert.AreEqual(new DateTime(2016, 10, 03).Day, DateTime.Parse(mockAgent.LijstGetByWeekInput[0]).Day);
        }
예제 #4
0
        public void WeergevenHuidigeWeekModelCheck()
        {
            //Arrange
            MockAgent mockAgent = new MockAgent();
            var       target    = new CursusController(mockAgent);

            //Act
            var result = target.Index(41, 2016);

            //Assert
            var resultModel = (result as ViewResult).Model;

            Assert.IsInstanceOfType(result, typeof(IActionResult));
            Assert.IsInstanceOfType(resultModel, typeof(IEnumerable <CursusInstantie>));
        }