public Task <RunSummary> RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource) { TestTraceListener.Ensure(); MessageBusOverride messageBusOverride = new MessageBusOverride(messageBus) .AddAfterStartingBeforeFinished(new ExecuteBeforeAfterAttributesMessageBusInjection(Method, _testCase.TestMethod.TestClass.Class)); var testInformationFixtureIndex = Array.IndexOf(constructorArguments, ClassRunner.TestMethodFixtureDummy); if (testInformationFixtureIndex == -1) { return(RunAsyncOverride(diagnosticMessageSink, messageBusOverride, constructorArguments, aggregator, cancellationTokenSource)); } var testMethodFixture = new TestMethodFixture(_testCase.TestMethod.Method.ToRuntimeMethod()); var constructorArgumentsCopy = InjectTestMethodFixture(constructorArguments, testInformationFixtureIndex, testMethodFixture); var testCaseRunTask = RunAsyncOverride(diagnosticMessageSink, messageBusOverride, constructorArgumentsCopy, aggregator, cancellationTokenSource); var observeTask = CreateObserveTask(testMethodFixture.FailedObservedTask, messageBusOverride, cancellationTokenSource); return(Task.WhenAny(testCaseRunTask, observeTask) .Unwrap() .ContinueWith((t, s) => { ((IDisposable)s).Dispose(); return t.Result; }, testMethodFixture, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)); }
private static object[] InjectTestMethodFixture(object[] constructorArguments, int testInformationFixtureIndex, TestMethodFixture testMethodFixture) { var constructorArgumentsCopy = new object[constructorArguments.Length]; Array.Copy(constructorArguments, constructorArgumentsCopy, constructorArguments.Length); constructorArgumentsCopy[testInformationFixtureIndex] = testMethodFixture; return(constructorArgumentsCopy); }
public Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource) { TestTraceListener.Ensure(); MessageBusOverride messageBusOverride = new MessageBusOverride(messageBus) .AddAfterStartingBeforeFinished(new ExecuteBeforeAfterAttributesMessageBusInjection(Method, _testCase.TestMethod.TestClass.Class)); var testInformationFixtureIndex = Array.IndexOf(constructorArguments, ClassRunner.TestMethodFixtureDummy); if (testInformationFixtureIndex == -1) { return RunAsyncOverride(diagnosticMessageSink, messageBusOverride, constructorArguments, aggregator, cancellationTokenSource); } var testMethodFixture = new TestMethodFixture(_testCase.TestMethod.Method.ToRuntimeMethod()); var constructorArgumentsCopy = InjectTestMethodFixture(constructorArguments, testInformationFixtureIndex, testMethodFixture); var testCaseRunTask = RunAsyncOverride(diagnosticMessageSink, messageBusOverride, constructorArgumentsCopy, aggregator, cancellationTokenSource); var observeTask = CreateObserveTask(testMethodFixture.FailedObservedTask, messageBusOverride, cancellationTokenSource); return Task.WhenAny(testCaseRunTask, observeTask) .Unwrap() .ContinueWith((t, s) => { ((IDisposable) s).Dispose(); return t.Result; }, testMethodFixture, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); }
private static object[] InjectTestMethodFixture(object[] constructorArguments, int testInformationFixtureIndex, TestMethodFixture testMethodFixture) { var constructorArgumentsCopy = new object[constructorArguments.Length]; Array.Copy(constructorArguments, constructorArgumentsCopy, constructorArguments.Length); constructorArgumentsCopy[testInformationFixtureIndex] = testMethodFixture; return constructorArgumentsCopy; }
public DebugReplTest(TestMethodFixture testMethod) { _testMethod = testMethod.MethodInfo; _sessionProvider = new RSessionProvider(); _session = _sessionProvider.GetOrCreate(Guid.NewGuid(), new RHostClientTestApp()); }
public InteractionEvaluation(TestMethodFixture testMethod) { _testMethod = testMethod.Method; _session = new RSession(0, null, () => {}); }
public XamlGraphicsDeviceTest(TestMethodFixture testMethod) { _testMethod = testMethod.MethodInfo; }
public RSessionTest(TestMethodFixture testMethod) { _testMethod = testMethod.MethodInfo; }
public CancelAll(TestMethodFixture testMethod) { _testMethodFixture = testMethod; _testMethod = testMethod.MethodInfo; _session = new RSession(0, null, () => {}); }
public IdeGraphicsDeviceTest(GraphicsDeviceTestFilesFixture files, TestMethodFixture testMethod) { _files = files; _testMethod = testMethod.MethodInfo; }
public ValuesTest(TestMethodFixture testMethod) { _testMethod = testMethod.MethodInfo; }