TestContext(TestContextOptions)
Initializes a new instance of the TestContext class. Tests typically do not call this constructor directly, but instead the CreateTestContext(IAdditionalServiceCollection) method.
Declaration
public TestContext(TestContextOptions contextOptions)
Parameters
Type | Name | Description |
---|---|---|
TestContextOptions | contextOptions |
TestContext(TestContextOptions, IAdditionalServiceCollection?, string?)
Declaration
[Obsolete("Instead of supplying the testName parameter, set the ProjectName property of TestContextOptions.")]
public TestContext(TestContextOptions contextOptions, IAdditionalServiceCollection? additionalServices = null, string? testName = null)
Parameters
Type | Name | Description |
---|---|---|
TestContextOptions | contextOptions | |
IAdditionalServiceCollection | additionalServices | |
string | testName |
TestContext(TestContextOptions, IAdditionalServiceCollection?)
Initializes a new instance of the TestContext class and specify an optional IAdditionalServiceCollection. Tests typically do not call this constructor directly, but instead the CreateTestContext(IAdditionalServiceCollection) method.
Declaration
public TestContext(TestContextOptions contextOptions, IAdditionalServiceCollection? additionalServices = null)
Parameters
Type | Name | Description |
---|---|---|
TestContextOptions | contextOptions | |
IAdditionalServiceCollection | additionalServices |