We use FluentValidation for input validation in our ASP.NET Core MVC controllers. Since the validators are a critical part of the system from a security point of view, we'd like to create unit tests that ensure that validation in actually active, and that the right validator is used for each controller.
We enable FluentValidation as usual in Startup.cs:
services.AddMvc(...).AddFluentValidation(...);
I haven't been able to find anything about this, only about unit testing the validators directly, which is a different case.
How do we unit-test the validation chain?