コード例 #1
0
        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();
        }
コード例 #2
0
 public TestMethodResolver([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
                           [Import] TestContainerDiscoverer discoverer)
 {
     this.serviceProvider = serviceProvider;
     this.discoverer      = discoverer;
 }