NUnit.Framework.Internal.Execution
Namespace with 31 public types
Classes
CompositeWorkItem
A CompositeWorkItem represents a test suite and
encapsulates the execution of the suite as well
as all its child tests.
EventListenerTextWriter
EventListenerTextWriter sends text output to the currently active
ITestEventListener in the form of a TestOutput object. If no event
listener is active in the context, or if there is no context,
the output is forwarded to the supplied default writer.
EventPump
EventPump pulls Event instances out of an EventQueue and sends
them to a ITestListener. It is used to send these events back to
the client without using the CallContext of the test
runner thread.
EventQueue
Implements a queue of work items for the Event type each of which
is queued as a WaitCallback.
MainThreadWorkItemDispatcher
MainThreadWorkItemDispatcher handles execution of WorkItems by
directly executing them on the main thread. This is different
from the SimpleWorkItemDispatcher where the work item is dispatched
onto its own thread.
ParallelWorkItemDispatcher
ParallelWorkItemDispatcher handles execution of work items by
queuing them for worker threads to process.
QueuingEventListener
QueuingEventListener uses an EventQueue to store any
events received on its EventListener interface.
SimpleWorkItem
A SimpleWorkItem represents a single test case and is
marked as completed immediately upon execution. This
class is also used for skipped or ignored test suites.
SimpleWorkItemDispatcher
SimpleWorkItemDispatcher handles execution of WorkItems by
directly executing them. It is provided so that a dispatcher
is always available in the context, thereby simplifying the
code needed to run child tests.
StaticMethodValidator
Checks whether the method to execute is static.
TestFinishedEvent
TestFinishedEvent holds information needed to call the TestFinished method.
TestMessageEvent
TestMessageEvent holds information needed to call the SendMessage method.
TestOutputEvent
TestOutputEvent holds information needed to call the TestOutput method.
TestStartedEvent
TestStartedEvent holds information needed to call the TestStarted method.
TestWorker
A TestWorker pulls work items from a queue
and executes them.
TextCapture
The TextCapture class intercepts console output and writes it
to the current execution context, if one is present on the thread.
If no execution context is found, the output is written to a
default destination, normally the original destination of the
intercepted output.
WorkItemQueue
A WorkItemQueue holds work items that are ready to
be run, either initially or after some dependency
has been satisfied.
WorkShift
The dispatcher needs to do different things at different,
non-overlapped times. For example, non-parallel tests may
not be run at the same time as parallel tests. We model
this using the metaphor of a working shift. The WorkShift
class associates one or more WorkItemQueues with one or
more TestWorkers.
Work in the queues is processed until all queues are empty
and all workers are idle. Both tests are needed because a
worker that is busy may end up adding more work to one of
the queues. At that point, the shift is over and another
shift may begin. This cycle continues until all the tests
have been run.
Enumerations
EventPumpState
The EventPumpState enum represents the state of an
EventPump.
ParallelExecutionStrategy
Enumeration representing the strategy to follow in executing a work item.
The value is only relevant when running under the parallel dispatcher.
WorkItemQueueState
WorkItemQueueState indicates the current state of a WorkItemQueue
WorkItemState
The current state of a work item
Static Classes
WorkItemBuilder
WorkItemBuilder class knows how to build a tree of work items from a tree of tests
Abstract Classes
Event
NUnit.Core.Event is the abstract base for all stored standard events.
An Event is the stored representation of a call to the
ITestListener interface and is used to record such calls
or to queue them for forwarding on another thread or at
a later time.
EventPump`2
EventPump base class pulls events of any type out of an EventQueue and sends
them to any listener. It is used to send events back to
the client without using the CallContext of the test
runner thread.
EventQueue`1
Implements a template for a queue of work items each of which
is queued as a WaitCallback.
It can handle any event types.
WorkItem
A WorkItem may be an individual test case, a fixture or
a higher level grouping of tests. All WorkItems inherit
from the abstract WorkItem class, which uses the template
pattern to allow derived classes to perform work in
whatever way is needed.
A WorkItem is created with a particular TestExecutionContext
and is responsible for re-establishing that context in the
current thread before it begins or resumes execution.
Interfaces
IEvent`1
Interface for ALL event types that can be queued for processing.
IMethodValidator
Validates method to execute.
IWorkItemDispatcher
An IWorkItemDispatcher handles execution of work items.