Class ProtoTestAttribute

Namespace
ProtoTest.MSTest
Assembly
ProtoTest.MSTest.dll

Custom MSTest method attribute that manages the ProtoTest execution context lifecycle asynchronously. MSTest invokes this once per data row, so each row is its own lifecycle and its own trace.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class ProtoTestAttribute : TestMethodAttribute
Inheritance
TestMethodAttribute
ProtoTestAttribute
Inherited Members
TestMethodAttribute.DisplayName
TestMethodAttribute.UnfoldingStrategy
TestMethodAttribute.DeclaringFilePath
TestMethodAttribute.DeclaringLineNumber
Extension Methods

Constructors

ProtoTestAttribute(string, int)

Custom MSTest method attribute that manages the ProtoTest execution context lifecycle asynchronously. MSTest invokes this once per data row, so each row is its own lifecycle and its own trace.

public ProtoTestAttribute(string callerFilePath = "", int callerLineNumber = -1)

Parameters

callerFilePath string
callerLineNumber int

Methods

ExecuteAsync(ITestMethod)

Executes a test method.

public override Task<TestResult[]> ExecuteAsync(ITestMethod testMethod)

Parameters

testMethod ITestMethod

The test method to execute.

Returns

Task<TestResult[]>

An array of TestResult objects that represent the outcome(s) of the test.

Remarks

Extensions can override this method to customize running a TestMethod.