public void SetUp() { var fixture = new TestFixture(); fixture.AddMappingProfile <TableMappingProfile>(); if (UseInMemoryDb) { fixture.UseInMemoryDatabase <TableTestContext>(); } else { fixture.UseDatabase <TableTestContext>(); } fixture.Initialize(); Context = fixture.GetService <TableTestContext>(); Context.Database.EnsureDeleted(); Context.Database.EnsureCreated(); TableOrderTestDataInitializer.Init(Context); }
public void SetUp() { var fixture = new TestFixture(); fixture.AddMappingProfile <GenericInfrastructureMappingProfile>(); if (UseInMemoryDb) { fixture.UseInMemoryDatabase <GenericInfrastructureContext>(); } else { fixture.UseDatabase <GenericInfrastructureContext>(); } fixture.Services.AddScoped <TestRepository>(); fixture.Initialize(); Context = fixture.GetService <GenericInfrastructureContext>(); Context.Database.EnsureDeleted(); Context.Database.EnsureCreated(); GenericInfrastructureDataInitializer.Init(Context); Repository = fixture.GetService <TestRepository>(); }
public void SetUp() { var fixture = new TestFixture(); fixture.AddMappingProfile <TableMappingProfile>(); fixture.UseInMemoryDatabase <TableTestContext>(); fixture.Initialize(); Context = fixture.GetService <TableTestContext>(); TableFilterTestDataInitializer.Init(Context); }