-
Notifications
You must be signed in to change notification settings - Fork 1
How integrate support class with your class
NightAngell edited this page Feb 24, 2019
·
10 revisions
After you add nuget to your test project, SignalR_UnitTestingSupport is ready to use.
All IHubContext support classes are in
SignalR_UnitTestingSupportCommon.IHubContextSupportnamespace
For NUnit: All testing base classes are in
SignalR_UnitTestingSupport.Hubsnamespace
For xUnit: All testing base classes are in
SignalR_UnitTestingSupportXUnit.Hubsnamespace
For MSTest: All testing base classes are in
SignalR_UnitTestingSupportMSTest.Hubsnamespace
Create test class for hub for example:
class ExampleHubTests {}And then:
class ExampleHubTests : HubUnitTestsBase {}class ExampleHubTests : HubUnitTestsBase<T> {}class ExampleHubTests : HubUnitTestsWithEF<TDbContext> {}TDbContext is any class which inherit from
Microsoft.EntityFrameworkCore.DbContextor DbContext itself.
class ExampleHubTests : HubUnitTestsWithEF<T, TDbContext> {}TDbContext is any class which inherit from
Microsoft.EntityFrameworkCore.DbContextor DbContext itself.
5. For testing with IHubContext<THub> see this.
5. For testing with IHubContext<THub, TIHubResponses> see this.
How use second approach. See this.