...
First, we will start with how to set up our projects , and then continue with simple unit test examples and finish with a master-detail scenario.
Project Setup:
Let us begin setting up our projects. As with any other technology you will need at least two projects. The first one is the Blazor application and the second one is for the unit tests.
...
var cut = RenderComponent<Counter>();
cut.Find("p").MarkupMatches("<p>Current count: 0</p>");
// Act
var element = cut.Find("button");
element.Click();
//Assert Assert
cut.Find("p").MarkupMatches("<p>Current count: 1</p>");
...