public void ShouldExportDataIfValidAndAcceptingAnyState()
        {
            // arrange
            ActionExecutedContext context = new ActionExecutedContext();
            MockController c = new MockController();
            context.Controller = c;
            MockExportAttribute attr = new MockExportAttribute("Test", EExportWhen.AnyModelState);

            // act
            attr.OnActionExecuted(context);

            // assert
            Assert.IsTrue(c.TempData.ContainsKey("Test"));
        }
        public void ShouldExportDataIfModelStateInvalid()
        {
            // arrange
            ActionExecutedContext context = new ActionExecutedContext();
            MockController c = new MockController();
            context.Controller = c;
            c.ViewData.ModelState.AddModelError("", "Error");
            MockExportAttribute attr = new MockExportAttribute("Test", EExportWhen.ModelStateInvalid);

            // act
            attr.OnActionExecuted(context);

            // assert
            Assert.IsTrue(c.TempData.ContainsKey("Test"));
        }