public void InitializeTests() { var options = new DbContextOptionsBuilder <PCBuilderContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; this.mapper = MockAutoMapper.GetAutoMapper(); this.dbContext = new PCBuilderContext(options); this.controller = new PowerSuppliesController(dbContext, mapper); }
public void InitializeTests() { this.mapper = MockAutoMapper.GetAutoMapper(); this.dbContext = MockDbContext.GetContext(); this.controller = new PowerSuppliesController(dbContext, mapper); }