Constructors
-
Test
Invoker`1(ITest, protected Initializes a new instance of the TestInvoker`1 class.IMessage Bus, Type, Object[], Method Info, Object[], Exception Aggregator, Cancellation Token Source)
Methods
-
After
Test protectedvirtual This method is called just after the test method has finished executing. This method should NEVER throw; any exceptions should be placed into the Aggregator.Method Invoked Async() -
Before
Test protectedvirtual This method is called just before the test method is invoked. This method should NEVER throw; any exceptions should be placed into the Aggregator.Method Invoked Async() -
Call
Test protectedvirtual This method calls the test method via reflection. This is an available override point if you need to do some other form of invocation of the actual test method.Method(Object) -
Create
Test protectedvirtual Creates the test class, unless the test method is static or there have already been errors. Note that this method times the creation of the test class (using Timer). It is also responsible for sending the ITestClassConstructionStartingand ITestClassConstructionFinished messages, so if you override this method without calling the base, you are responsible for all of this behavior. This method should NEVER throw; any exceptions should be placed into the Aggregator.Class() -
Get
Task static Given an object, will determine if it is an instance of Task (in which case, it is directly returned), or an instance of FSharpAsync`1 (in which case it is converted), or neither (in which case null is returned).From Result(Object) -
Invoke
Test protectedvirtual Invokes the test method on the given test class instance. This method sets up support for "async void" test methods, ensures that the test method has the correct number of arguments, then calls CallTestMethod(System.Object) to do the actual method invocation. It ensure that any async test method is fully completed before returning, and returns the measured clock time that the invocation took.Method Async(Object) -
Run
Async() Creates the test class (if necessary), and invokes the test method.
Properties
- Aggregator protected Gets or sets the exception aggregator used to run code and collect exceptions.
-
Cancellation
Token protected Gets or sets the task cancellation token source, used to cancel the test run.Source -
Constructor
Arguments protected Gets or sets the constructor arguments used to construct the test class. -
Display
Name protected Gets the display name of the invoked test. -
Message
Bus protected Gets or sets the message bus to report run status to. - Test protected Gets or sets the test to be run.
-
Test
Case protected Gets the test case to be run. -
Test
Class protected Gets or sets the runtime type of the class that contains the test method. -
Test
Method protected Gets or sets the runtime method of the method that contains the test. -
Test
Method protected Gets or sets the arguments to pass to the test method when it's being invoked.Arguments - Timer protected Gets or sets the object which measures execution time.