public void SetUp() { mocker = new AutoMoqer(); var mockDisposeAwareTaskRunner = mocker.GetMock <IDisposeAwareTaskRunner>(); mockDisposeAwareTaskRunner.Setup(runner => runner.RunAsync(It.IsAny <Func <Task> >())).Callback <Func <Task> >(async taskProvider => await taskProvider()); testContainerDiscoverer = mocker.Create <TestContainerDiscoverer>(); testContainerDiscoverer.RunAsync = (taskProvider) => { taskProvider().Wait(); }; testContainerDiscoverer.initializeTask.Wait(); }
public TestMethodResolver([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, [Import] TestContainerDiscoverer discoverer) { this.serviceProvider = serviceProvider; this.discoverer = discoverer; }