Unit testing a custom middleware in ASP.NET Core API
Middlewares are a fundamental part of any ASP.NET Core application, introduced from day one. They are executed in the order they are added on every request, and could be considered similar to the HttpHandlers
and HttpModules
of the classic ASP.NET. Since middlewares can execute code before or after calling the next in the pipeline, they are considered ideal for a ton of various application features, including exception handling, logging, authentication etc.
Read More »Unit testing a custom middleware in ASP.NET Core API