-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: New up renderer for markup matches #1160
Conversation
65144e7
to
2e1468f
Compare
tests/bunit.web.tests/EventDispatchExtensions/GeneralEventDispatchExtensionsTest.cs
Outdated
Show resolved
Hide resolved
db8f87e
to
784749d
Compare
using var renderer = new TestRenderer( | ||
actual.Services.GetRequiredService<IRenderedComponentActivator>(), | ||
actual.Services.GetRequiredService<TestServiceProvider>(), | ||
actual.Services.GetRequiredService<ILoggerFactory>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI you can use ActivatorUtilities.CreateInstance
to create a new instance while automatically supplying existing services. Makes it less brittle if new services are needed in the future, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting one. I would still prefer the explicit new but a nice addition in any case.
Thanks
Newing up a renderer for
MarkupMatches
to prevent being deadlocked to renderer the expectedRenderFragment
.