Tim Deschryver 10/11/2021

Refactor Functional Tests to support Minimal Web APIs

Read Original

This technical article explains how to refactor existing functional tests when migrating a traditional ASP.NET Web API to the new Minimal Web API structure in .NET 6. It details the specific challenge of referencing the internal `Program` class instead of a `Startup` class and provides a solution using the `InternalsVisibleTo` attribute to allow test projects access, ensuring tests remain largely unchanged.

Refactor Functional Tests to support Minimal Web APIs

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week