Class TestDiscoverySink
An implementation of IMessageSink designed for test discovery for a single test assembly. The Finished event is triggered when discovery is complete.
public class TestDiscoverySink : IMessageSink, IDisposable
- Inheritance
-
TestDiscoverySink
- Implements
- Inherited Members
Constructors
TestDiscoverySink(Func<bool>?)
Initializes a new instance of the TestDiscoverySink class.
public TestDiscoverySink(Func<bool>? cancelThunk = null)
Parameters
Properties
DiscoverySink
Gets the event sink used to record discovery messages.
protected DiscoveryEventSink DiscoverySink { get; }
Property Value
Finished
Gets an event which is signaled once discovery is finished.
public ManualResetEvent Finished { get; }
Property Value
TestCases
The list of discovered test cases.
public List<ITestCaseDiscovered> TestCases { get; }
Property Value
Methods
Dispose()
public void Dispose()
OnMessage(IMessageSinkMessage)
Reports the presence of a message on the message bus. This method should never throw exceptions.
public bool OnMessage(IMessageSinkMessage message)
Parameters
messageIMessageSinkMessageThe message from the message bus
Returns
- bool
Return
trueto continue running tests, orfalseto stop.