Example #1
0
        public void IndexAction_Is3PM_Feb292016_ThrowsApplicationException()
        {
            //arrage
            NUnitTestController controller = new NUnitTestController(new DateTime(2016, 2, 29, 17, 0, 0));

            //act
            controller.Index();
        }
Example #2
0
        public void IndexAction_Is3PM_June_ReturnsDayModel_SceenSummerDay()
        {
            //arrange
            NUnitTestController controller = new NUnitTestController(new DateTime(2012, 6, 1, 14, 0, 0));
            string expected = "SummerDay";
            //act
            var result = controller.Index() as ViewResult;
            var model  = result.ViewData.Model as DayModel;

            Assert.IsNotNull(model, "Incorrect model, expected DayModel");
            Assert.AreEqual(expected, model.SceneName);
        }