Exemplo n.º 1
0
        public void Should_Not_Redirect_When_UpgradeRequired_Is_True_Is_UpgradeController()
        {
            // Arrange
            _applicationSettings.Installed       = true;
            _applicationSettings.UpgradeRequired = true;

            UpgradeControllerStub  upgradeController = new UpgradeControllerStub(_applicationSettings, _userService, _repository, _settingsService, _context, _configReaderWriter);
            ActionExecutingContext filterContext     = new ActionExecutingContext();

            filterContext.Controller = upgradeController;

            // Act
            upgradeController.CallOnActionExecuting(filterContext);

            // Assert
            Assert.That(filterContext.Result, Is.Null);
        }
Exemplo n.º 2
0
        public void Should_Not_Redirect_When_UpgradeRequired_Is_True_Is_UpgradeController()
        {
            // Arrange
            _applicationSettings.Installed = true;
            _applicationSettings.UpgradeRequired = true;

            UpgradeControllerStub upgradeController = new UpgradeControllerStub(_applicationSettings, _userService, _repository, _settingsService, _context, _configReaderWriter);
            ActionExecutingContext filterContext = new ActionExecutingContext();
            filterContext.Controller = upgradeController;

            // Act
            upgradeController.CallOnActionExecuting(filterContext);

            // Assert
            Assert.That(filterContext.Result, Is.Null);
        }