I have controllers with role based Authorize attribute, below is an example. I want to test authorization role setting for each controller, for example only "company admin", "group admin" can access UserController. what is the best way to do it?
[Authorize(Roles = ("company admin", "group admin")]
[Route("api/v1/")]
[ApiController]
public class UserController : ControllerWithLog
{
thanks!