public void PageSize_ReturnsRedirectToActionResult()
        {
            var accessor   = TestHelperLibrary.SetUpHttpContextAccessor();
            var unitOfWork = TestHelperLibrary.SetupUnitOfWork();

            var controller = new VacationController(unitOfWork.Object, accessor.Object);

            var result = controller.PageSize(1) as RedirectToActionResult;

            Assert.IsType <RedirectToActionResult>(result);
        }
        public void PageSizeAction_ReturnsRedirectToAction()
        {
            var mockDataAccessor = new Mock <IVacationPlannerDataAccessor>();
            var httpContext      = new DefaultHttpContext();
            var tempData         = new TempDataDictionary(httpContext, Mock.Of <ITempDataProvider>());
            var httpCtx          = new Mock <IHttpContextAccessor>();

            httpCtx.Setup(m => m.HttpContext.Session).Returns(new Mock <ISession>().Object);

            mockDataAccessor.Setup(m => m.Locations).Returns(new Mock <IRepository <Location> >().Object);
            mockDataAccessor.Setup(m => m.Accommodations).Returns(new Mock <IRepository <Accommodation> >().Object);
            mockDataAccessor.Setup(m => m.Activities).Returns(new Mock <IRepository <Activity> >().Object);
            mockDataAccessor.Setup(m => m.Vacations).Returns(new Mock <IRepository <Vacation> >().Object);

            var controller = new VacationController(mockDataAccessor.Object, httpCtx.Object)
            {
                TempData = tempData
            };
            var result = controller.PageSize(1);

            Assert.IsType <RedirectToActionResult>(result);
        }