Class ManagerTestHarness
Provides the capability to test Manager services.
Inheritance
System.Object
ManagerTestHarness
Implements
System.IDisposable
Namespace: Copper.Conventions.Method.Testing.Harness.V1
Assembly: Copper.Conventions.Method.Testing.Harness.dll
Syntax
public class ManagerTestHarness : IDisposable
Constructors
View SourceManagerTestHarness(TestHarness, IManagerRequestSubmitterBuilderFactory, IManagerEventPublisherBuilderFactory)
Initializes a new instance of the ManagerTestHarness class.
Declaration
public ManagerTestHarness(TestHarness testHarness, IManagerRequestSubmitterBuilderFactory managerRequestSubmitterBuilderFactory, IManagerEventPublisherBuilderFactory managerEventPublisherBuilderFactory)
Parameters
Type | Name | Description |
---|---|---|
TestHarness | testHarness | The test harness. |
IManagerRequestSubmitterBuilderFactory | managerRequestSubmitterBuilderFactory | The manager request submitter builder factory. |
IManagerEventPublisherBuilderFactory | managerEventPublisherBuilderFactory | The manager event publisher builder factory. |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|
Run()
Runs the test harness.
Declaration
public void Run()
RunAsync()
Runs the test harness.
Declaration
public async Task RunAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
TestManager<TContract>(String, Func<TContract, Task>)
Executes a scenario on a Manager contract.
Declaration
public async Task TestManager<TContract>(string applicationName, Func<TContract, Task> scenario)
where TContract : class
Parameters
Type | Name | Description |
---|---|---|
System.String | applicationName | The application name. |
System.Func<TContract, System.Threading.Tasks.Task> | scenario | The scenario. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
TContract | The contract type. |
TestManagerEvents<TManagerEvents>(Func<TManagerEvents, Task>)
Executes a scenario on a Manager events contract.
Declaration
public Task TestManagerEvents<TManagerEvents>(Func<TManagerEvents, Task> scenario)
where TManagerEvents : class
Parameters
Type | Name | Description |
---|---|---|
System.Func<TManagerEvents, System.Threading.Tasks.Task> | scenario | The scenario. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
TManagerEvents | The events contract type. |
Implements
System.IDisposable