Beispiel #1
0
 public void BeforeEach()
 {
     implementationInstance = new object();
     serviceProvider        = new ServiceCollection()
                              .AddSingleton(implementationInstance)
                              .AddTransient(typeof(ITestService), typeof(TestService))
                              .AddTransient(typeof(ITestService), typeof(AnotherTestService))
                              .BuildServiceProvider();
     _defaultDependencyScope = new DefaultDependencyScope(serviceProvider.CreateScope());
 }
Beispiel #2
0
 public void BeforeEach()
 {
     serviceScope           = new Mock <IServiceScope>();
     defaultDependencyScope = new DefaultDependencyScope(serviceScope.Object);
 }