You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[bUnit](https://www.nuget.org/packages/bunit/)| Adds support for testing Blazor components. |[](https://www.nuget.org/packages/bunit/)|
26
+
|[bUnit.analyzers](https://www.nuget.org/packages/bunit.analyzers/)| Roslyn analyzers to help identify common mistakes and anti-patterns. |[](https://www.nuget.org/packages/bunit.analyzers/)|
26
27
|[bUnit.template](https://www.nuget.org/packages/bunit.template/)| Template, which currently creates xUnit-based bUnit test projects only. |[](https://www.nuget.org/packages/bunit.template/)|
27
28
|[bUnit.generators](https://www.nuget.org/packages/bunit.generators/)| Source code generators to minimize code setup in various situations. |[](https://www.nuget.org/packages/bunit.generators/)|
28
29
|[bUnit.web.query](https://www.nuget.org/packages/bunit.web.query/)| bUnit implementation of testing-library.com's query APIs. |[](https://www.nuget.org/packages/bunit.web.query/)|
### BUNIT0001: Razor test files should inherit from BunitContext
8
24
25
+
**Status**: 🚧 Planned
26
+
9
27
When writing tests in `.razor` files that use variables or event callbacks from the test code, the file must inherit from `BunitContext` using `@inherits BunitContext`. Otherwise, you may encounter the error "The render handle is not yet assigned."
10
28
11
29
**Bad:**
@@ -36,20 +54,6 @@ When writing tests in `.razor` files that use variables or event callbacks from
36
54
}
37
55
```
38
56
39
-
### BUNIT0002: Prefer Find<T> over casting
40
-
41
-
When finding elements with a specific type, use `Find<T>(selector)` instead of casting the result of `Find(selector)`.
0 commit comments