TIL: How to test an ASP.NET Authorization Filter

from blog Just Some Code, | ↗ original
This post is part of my Advent of Code 2022. These days I needed to work with a microservice for one of my clients. In that microservice, instead of validating incoming requests with the built-in model validations or FluentValidation, they use authorization filters. I needed to write some tests for that filter. This is what I learned. Apart from...