pkskelly / BlazorGolf

Blazor and Web API sample application to learn api design and blazor
MIT License
0 stars 0 forks source link

Enable Unit Testing AuthZ/N on API #28

Open pkskelly opened 2 years ago

pkskelly commented 2 years ago

Enable unit testing with authenticated credentials. See Joonas W's blog post on unit testing Azure AD secured API's

pkskelly commented 2 years ago

Review ASP.NET Core integration tests with WebApplicationFactory and try to unit test the actual API vs an integration test that requires making Azure AD authentication calls.

The changes in .NET 6 may have changed some of the implementation for this. Also check out the AspNet TestServer to see if this can be used.