();
- }
-}
-#endif
\ No newline at end of file
diff --git a/tests/bunit.testassets/RenderModes/ComponentWithServerRenderMode.razor b/tests/bunit.testassets/RenderModes/ComponentWithServerRenderMode.razor
new file mode 100644
index 000000000..3ce1d35a0
--- /dev/null
+++ b/tests/bunit.testassets/RenderModes/ComponentWithServerRenderMode.razor
@@ -0,0 +1,15 @@
+@{
+#if NET9_0_OR_GREATER
+}
+
+@rendermode Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+@(ChildContent is not null ? "Parent assigned" : "Assigned") render mode: @AssignedRenderMode?.GetType().Name
+@ChildContent
+
+@code {
+ [Parameter] public RenderFragment? ChildContent { get; set; }
+}
+
+@{
+#endif
+}
\ No newline at end of file
diff --git a/tests/bunit.testassets/RenderModes/ComponentWithWebAssemblyRenderMode.razor b/tests/bunit.testassets/RenderModes/ComponentWithWebAssemblyRenderMode.razor
new file mode 100644
index 000000000..af0888317
--- /dev/null
+++ b/tests/bunit.testassets/RenderModes/ComponentWithWebAssemblyRenderMode.razor
@@ -0,0 +1,15 @@
+@{
+#if NET9_0_OR_GREATER
+}
+
+@rendermode Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveWebAssembly
+@(ChildContent is not null ? "Parent assigned" : "Assigned") render mode: @AssignedRenderMode?.GetType().Name
+@ChildContent
+
+@code {
+ [Parameter] public RenderFragment? ChildContent { get; set; }
+}
+
+@{
+#endif
+}
\ No newline at end of file
diff --git a/tests/bunit.testassets/RenderModes/ComponentWithoutRenderMode.razor b/tests/bunit.testassets/RenderModes/ComponentWithoutRenderMode.razor
new file mode 100644
index 000000000..6d5f7f9b7
--- /dev/null
+++ b/tests/bunit.testassets/RenderModes/ComponentWithoutRenderMode.razor
@@ -0,0 +1,14 @@
+@{
+#if NET9_0_OR_GREATER
+}
+
+@(ChildContent is not null ? "Parent assigned" : "Assigned") render mode: @AssignedRenderMode?.GetType().Name
+@ChildContent
+
+@code {
+ [Parameter] public RenderFragment? ChildContent { get; set; }
+}
+
+@{
+#endif
+}
\ No newline at end of file