-
Book Overview & Buying
-
Table Of Contents
Clean Architecture with .NET
By :
To ensure the reliability and functionality of our Presentation layer, we will use bUnit, a testing library specifically designed for Blazor components. Additionally, we introduce the Microsoft.AspNetCore.Mvc.Testing library to aid in integration testing. This section will guide you through setting up and running tests using these libraries.
bUnit is a powerful testing library for Blazor applications. It provides TestContext for setting up and tearing down the test environment, and the RenderComponent method to render Blazor components in a test context. Using bUnit, we can verify the behavior of our components and ensure they render correctly based on various states and inputs.
It is strongly encouraged to watch Egil Hansen's NDC conference on Blazor testing to gain a deeper understanding of bUnit and its capabilities (https://youtu.be/Co7QetPYiO4?si=AuIYxlb9xH6Ps1FK).
The Microsoft.AspNetCore.Mvc.Testing library is essential for integration...