public void WeergevenHuidigeWeek() { //Arrange MockAgent mockAgent = new MockAgent(); var target = new CursusController(mockAgent); //Act var result = target.Index(); //Assert Assert.IsInstanceOfType(result, typeof(IActionResult)); }
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)); }
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); }
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>)); }