SteveSandersonMS / BlazorUnitTestingPrototype

93 stars 54 forks source link

Allow Injection of IServiceCollection into TestHost #14

Open jrolstad opened 4 years ago

jrolstad commented 4 years ago

When configuring unit tests, access to the ServiceCollection is needed so that application dependencies can be registered and mocked out before the Blazor page is rendered. The TestHost needs a constructor that allows an IServiceCollection instance to be injected to allow this.

conficient commented 3 years ago

Look at https://bunit.dev/ instead if you need a better testing tool