Skip to content

Improve renderer unit test #62016

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

Merged
merged 4 commits into from
May 21, 2025
Merged

Improve renderer unit test #62016

merged 4 commits into from
May 21, 2025

Conversation

ilonatommy
Copy link
Member

This PR applies feedback from #61633. We wanted to merge the original PR asap, without re-running the CI.

Description

  • DoesNotRenderChildAfterRendererStopped -> it was testing if illegal render was possible after we stopped the renderer, the feedback suggested a flow of: render 1st time -> stop renderer - render 2nd time and check if render batches number grew.
  • TestEndpointHtmlRenderer had its own mechanism of stopping the renderer, not connected to base's class stopping. Making the EndpointHtmlRenderer stopping method internal, allows the test to call it. Because we want TestEndpointHtmlRenderer to keep track of the number of batches rendered, we keep the stopping method on TestEndpointHtmlRenderer as well.
  • Attributes can use parameters passed by constants. FeatureSwitchDefinition should reuse once defined string.

@ilonatommy ilonatommy added this to the 10.0-preview5 milestone May 20, 2025
@ilonatommy ilonatommy requested review from javiercn and maraf May 20, 2025 12:05
@ilonatommy ilonatommy self-assigned this May 20, 2025
@ilonatommy ilonatommy requested a review from a team as a code owner May 20, 2025 12:05
@ilonatommy ilonatommy added the area-blazor Includes: Blazor, Razor Components label May 20, 2025
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
@ilonatommy ilonatommy merged commit aebd07a into dotnet:main May 21, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants