protected virtual void BootstrapTest() { var autoMocker = new AutoMocker(); TCUT cut = autoMocker.CreateInstance <TCUT>(); CurrentTestProperties.Set(CutKey, cut); CurrentTestProperties.Set(ContainerKey, autoMocker); }
protected override void BootstrapTest() { var options = new DbContextOptionsBuilder <TDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; TDbContext dbContext = _dbContextInitValueFactory.Invoke(options); dbContext.Database.EnsureCreated(); //TSUT sut = (TSUT)CurrentTestProperties.Get("_sut"); //var serviceProvider = (IServiceProvider)CurrentTestProperties.Get("_serviceProvider"); CurrentTestProperties.Set(DbContextKey, dbContext); _dbContextsCreated.Add(dbContext); base.Setup(); }