Class TestFrameworkOptions
Represents options passed to a test framework for discovery or execution.
public class TestFrameworkOptions : ITestFrameworkDiscoveryOptions, ITestFrameworkExecutionOptions, ITestFrameworkOptions
- Inheritance
-
TestFrameworkOptions
- Implements
- Inherited Members
- Extension Methods
-
TestFrameworkOptionsReadWriteExtensions.GetPrintMaxObjectMemberCount(ITestFrameworkDiscoveryOptions)TestFrameworkOptionsReadWriteExtensions.SetDiagnosticMessages(ITestFrameworkDiscoveryOptions, bool?)TestFrameworkOptionsReadWriteExtensions.SetPrintMaxObjectDepth(ITestFrameworkDiscoveryOptions, int?)TestFrameworkOptionsReadWriteExtensions.GetPrintMaxObjectMemberCount(ITestFrameworkExecutionOptions)TestFrameworkOptionsReadWriteExtensions.SetDiagnosticMessages(ITestFrameworkExecutionOptions, bool?)
Methods
Empty()
INTERNAL METHOD, FOR TESTING PURPOSES ONLY. DO NOT CALL.
public static TestFrameworkOptions Empty()
Returns
ForDiscovery(TestAssemblyConfiguration)
Creates an instance of TestFrameworkOptions for discovery purposes.
public static ITestFrameworkDiscoveryOptions ForDiscovery(TestAssemblyConfiguration configuration)
Parameters
configurationTestAssemblyConfigurationThe configuration to copy values from.
Returns
ForDiscoveryFromSerialization(string)
Creates an instance of TestFrameworkOptions for discovery purposes.
public static ITestFrameworkDiscoveryOptions ForDiscoveryFromSerialization(string optionsJson)
Parameters
optionsJsonstringThe serialized discovery options.
Returns
ForExecution(TestAssemblyConfiguration)
Creates an instance of TestFrameworkOptions for execution purposes.
public static ITestFrameworkExecutionOptions ForExecution(TestAssemblyConfiguration configuration)
Parameters
configurationTestAssemblyConfigurationThe configuration to copy values from.
Returns
ForExecutionFromSerialization(string)
Creates an instance of TestFrameworkOptions for execution purposes.
public static ITestFrameworkExecutionOptions ForExecutionFromSerialization(string optionsJson)
Parameters
optionsJsonstringThe serialized execution options.
Returns
GetValue<TValue>(string)
Gets a value from the options collection.
public TValue? GetValue<TValue>(string name)
Parameters
namestringThe name of the value.
Returns
- TValue
Returns the value.
Type Parameters
TValueThe type of the value.
SetValue<TValue>(string, TValue)
Sets a value into the options collection.
public void SetValue<TValue>(string name, TValue value)
Parameters
namestringThe name of the value.
valueTValueThe value.
Type Parameters
TValueThe type of the value.
ToJson()
Converts the test framework options into JSON. Used for serializing the options for sending across a process boundary.
public string ToJson()
Returns
- string
The serialized framework options.