Class ScenarioAttribute
Marks a test a a scenario test.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class ScenarioAttribute : TestAttribute, ISimpleTestBuilder, IApplyToContext
- Inheritance
-
ScenarioAttribute
- Implements
-
ISimpleTestBuilderIApplyToContext
- Inherited Members
Constructors
ScenarioAttribute()
public ScenarioAttribute()
Properties
Name
Gets or sets the name of the scenario.
public string Name { get; set; }
Property Value
- string
The name of the scenario.
Properties
Gets the properties.
protected override IDictionary<string, object> Properties { get; }
Property Value
- IDictionary<string, object>
The properties.
TestName
Gets the name of the test.
protected override string TestName { get; }
Property Value
- string
The name of the test.
Methods
ApplyToContext(TestExecutionContext)
public void ApplyToContext(TestExecutionContext context)
Parameters
context
TestExecutionContext
BuildFrom(IMethodInfo, Test)
Build a TestMethod from the provided MethodInfo.
public override TestMethod BuildFrom(IMethodInfo method, Test suite)
Parameters
method
IMethodInfoThe method to be used as a test.
suite
TestThe TestSuite to which the method will be added.
Returns
- TestMethod
A TestMethod object.