public void ShouldNotChangeResultIfValidModel([Frozen]ControllerBase controller, [Substitute]ActionExecutingContext filterContext, ValidateModelAttribute validateModel)
    {
      filterContext.Controller = controller;

      validateModel.OnActionExecuting(filterContext);

      filterContext.Result.Should().BeNull();
    }
    public void ShouldChangeResultIfInvalidModel([Frozen]ControllerBase controller, [Substitute]ActionExecutingContext filterContext, ValidateModelAttribute validateModel)
    {
      filterContext.Controller = controller;
      filterContext.Controller.ViewData.ModelState.AddModelError("error","error");

      validateModel.OnActionExecuting(filterContext);

      filterContext.Result.Should().BeOfType<ViewResult>().Which.ViewData.ShouldBeEquivalentTo(filterContext.Controller.ViewData);
    }