Replies: 1 comment 1 reply
-
It was done to support the "supply parameter from query" feature and the changes that came with that in .NET 8. Are you using the FakeNavigationManager in a context outside of bUnit directly? The purpose for passing in a TestContext is that it provides access to the renderer which in turn provides access to the Dispatcher, which we need to use when triggering a navigation on a rendered component. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
In the latest version it was changed so the FakeNavigationManager constructor takes a TestContextBase:
The TestContextBase is IDisposable and that complicates my existing tests if I have to new and dispose a TestContextBase.
All my tests works fine if I just force TextContextBase to null:
Fixture.Inject<NavigationManager>(new FakeNavigationManager(null!));
Would it make sense to consider an empty constructor for FakeNavigationManager?
Best Regards,
Anders Havn
Beta Was this translation helpful? Give feedback.
All reactions