Class TestScenarioEnvironmentBuilder
- Namespace
- XBullet.EasyTesting.Hosting
- Assembly
- XBullet.EasyTesting.dll
Defines external dependencies that are created for each test scenario.
public sealed class TestScenarioEnvironmentBuilder
- Inheritance
-
TestScenarioEnvironmentBuilder
- Inherited Members
Methods
AddResource(string, Func<TestScenarioContext, ITestScenarioEnvironmentResource>)
Adds an external dependency factory and returns this builder.
public TestScenarioEnvironmentBuilder AddResource(string name, Func<TestScenarioContext, ITestScenarioEnvironmentResource> createResource)
Parameters
namestringThe non-empty, case-insensitively unique name used to retrieve the resource from the scenario scope.
createResourceFunc<TestScenarioContext, ITestScenarioEnvironmentResource>The factory invoked once while each scenario is being created. It receives that scenario's context and must return a non-null resource. The scenario assumes ownership of the returned resource and disposes it during cleanup. Factories are not invoked concurrently by a single test factory.
Returns
- TestScenarioEnvironmentBuilder
This builder so additional environment resources can be registered.