-
Notifications
You must be signed in to change notification settings - Fork 1
How integrate support class with your class
NightAngell edited this page Feb 16, 2019
·
10 revisions
After you add nuget to your test project, SignalR_UnitTestingSupport is ready to use.
For NUnit: All testing base classes are in
SignalR_UnitTestingSupport.Hubs
namespace
For xUnit: All testing base classes are in
SignalR_UnitTestingSupportXUnit.Hubs
namespace
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.DbContext
od DbContext itself.
class ExampleHubTests : HubUnitTestsWithEF<T, TDbContext> {}
TDbContext is any class which inherit from
Microsoft.EntityFrameworkCore.DbContext
od DbContext itself.
HubUnitTestsBaseCommon
is internal class (it must be marked by code as public, because it contain common code for all base classes). Do not use it by itself.