Skip to content
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

Register stubs of all default services Blazor provides at runtime with useful helper message #115

Closed
5 tasks done
egil opened this issue May 2, 2020 · 0 comments · Fixed by #223
Closed
5 tasks done
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@egil
Copy link
Member

egil commented May 2, 2020

Like we already have do with IJsRuntime, we should register stubs by default in the test service provider, that throws an helpful exception if invoked by a component under test. The message should explain what happened and where to find help setting up the dependency for testing.

These needs to be stubbed:

  • IJsRuntime
  • NavigationManager
  • HttpClient
  • IStringLocalizer
  • AuthenticationStateProvider

These are the default services registered by Blazor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant