Home

How-To: Write bUnit Tests for Components with EventCallbacks

Component callbacks allow developers to build Blazor components that fire events to their parent components/pages to notify them of state changes. The parent components can then respond to those changes as well. bUnit supports EventCallbacks as parameters on those components, so that we can validate their behavior. First, we must have a Blazor project and … Continue reading How-To: Write bUnit Tests for Components with EventCallbacks

How-To: Write bUnit Tests for Components with Parameters

Component parameters allow developers to build interactive and reusable Blazor components. bUnit provides us a couple of mechanisms for passing parameters to components, so that we can validate their behavior with test data. These parameters are set as part of the TestContext rendering process. First, we must have a Blazor project and corresponding test project. … Continue reading How-To: Write bUnit Tests for Components with Parameters


Follow My Blog

Get new content delivered directly to your inbox.