Interface IXunitTestCase
Represents a single test case from xUnit.net v2.
Namespace: Xunit.Sdk
Assembly: xunit.core.dll
Syntax
public interface IXunitTestCase : ITestCase
Properties
| Improve this Doc View SourceInitializationException
Gets the exception that happened during initialization. When this is set, then the test execution should fail with this exception.
Declaration
Exception InitializationException { get; }
Property Value
Type | Description |
---|---|
Exception |
Method
Gets the method to be run. Differs from
Declaration
IMethodInfo Method { get; }
Property Value
Type | Description |
---|---|
IMethodInfo |
Timeout
Gets the timeout of the test, in milliseconds; if zero or negative, means the test case has no timeout.
Declaration
int Timeout { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceRunAsync(IMessageSink, IMessageBus, Object[], ExceptionAggregator, CancellationTokenSource)
Executes the test case, returning 0 or more result messages through the message sink.
Declaration
Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
Parameters
Type | Name | Description |
---|---|---|
IMessageSink | diagnosticMessageSink | The message sink used to send diagnostic messages to. |
IMessageBus | messageBus | The message bus to report results to. |
Object[] | constructorArguments | The arguments to pass to the constructor. |
ExceptionAggregator | aggregator | The error aggregator to use for catching exception. |
CancellationTokenSource | cancellationTokenSource | The cancellation token source that indicates whether cancellation has been requested. |
Returns
Type | Description |
---|---|
Task<RunSummary> | Returns the summary of the test case run. |