public EntityStatesTest() { var dbContextFactory = new DbContextInMemoryFactory(nameof(EntityStatesTest)); _schoolDbContextSut = dbContextFactory.Create(); _schoolDbContextSut.Database.EnsureCreated(); }
public EntityTypesTest() { var dbContextFactory = new DbContextInMemoryFactory(DbName); _schoolDbContextSut = dbContextFactory.Create(); _schoolDbContextSut.Database.EnsureCreated(); }
public PersonRepositoryTests() { _dbContextFactory = new DbContextInMemoryFactory(nameof(PersonRepositoryTests)); using var dbx = _dbContextFactory.CreateDbContext(); dbx.Database.EnsureCreated(); _personRepositorySUT = new PersonRepository(_dbContextFactory); }
public RatingFacadeTests() { var dbContextFactory = new DbContextInMemoryFactory(nameof(ActorFacadeTest)); var unitOfWork = new UnitOfWork(dbContextFactory); repository = new Repository <RatingEntity>(unitOfWork); mapper = new RatingMapper(); facadeTestUnit = new RatingFacade(unitOfWork, repository, mapper); }
protected DbContextTestsBase(ITestOutputHelper output) { XUnitTestOutputConverter converter = new(output); Console.SetOut(converter); DbContextFactory = new DbContextInMemoryFactory(GetType().Name, seedTestingData: true); // DbContextFactory = new DbContextLocalDBTestingFactory(GetType().FullName!, seedTestingData: true); CookBookDbContextSUT = DbContextFactory.CreateDbContext(); }
public AddressFacadeTests() { var dbContextFactory = new DbContextInMemoryFactory(nameof(AddressFacadeTests)); var dbx = dbContextFactory.Create(); dbx.Database.EnsureCreated(); var unitOfWork = new UnitOfWork(dbx); _repository = new RepositoryBase <AddressEntity>(unitOfWork); _mapper = new AddressMapper(); var entityFactory = new EntityFactory(dbx.ChangeTracker); _facadeSUT = new AddressFacade(unitOfWork, _repository, _mapper, entityFactory); }
public LinqLazyEvaluationTest() { _dbContextFactory = new DbContextInMemoryFactory(nameof(EntityStatesTest)); _schoolDbContextSut = _dbContextFactory.Create(); _schoolDbContextSut.Database.EnsureCreated(); }
public FilmDatDbContextTests() { _dbContextFactory = new DbContextInMemoryFactory(nameof(FilmDatDbContext)); _filmDatDbContext = _dbContextFactory.CreateDbContext(); _filmDatDbContext.Database.EnsureCreated(); }