AI Unified Process plugin for C# and Blazor on .NET 10
88
87%
Does it follow best practices?
Impact
93%
0.95xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Generate unit and integration tests for Blazor .razor UI components using the bUnit testing library and xUnit.
A diff of the specification change may follow the file path in the arguments. When it is there, it is the definitive list of what changed — work through it change by change. A removed line means the scenario it described was dropped: delete the tests that exist only for it instead of keeping them as passing extras.
Before writing new tests, look for an existing test class for this use case / component (e.g.
UC001_PlaceOrderPageTests.cs, or any test that renders the component). If one exists, update it
to match the current specification and implementation instead of creating a second test class:
Features/UC001_PlaceOrder/PlaceOrderPage.razor).Bunit.TestContext (or use bUnit test fixture).Services.AddSingleton or Services.AddScoped.var authContext = this.AddTestAuthorization();).JSInterop.SetupVoid("localStorage.setItem").SetVoidResult();).var cut = RenderComponent<PlaceOrderPage>();cut.Find("button#submit").Click();OnInitializedAsync), use cut.WaitForState(() => cut.Find(".alert-success").TextContent.Contains("Order Placed")) or cut.WaitForAssertion(() => ...) before making assertions.cut.Find(".alert-success").MarkupMatches("<div class=\"alert-success\">Order Placed!</div>");dotnet test to confirm tests pass."Next step: Run
/playwright-testto generate native C# end-to-end browser tests for your use cases."