public TestContext() { var builder = new WebHostBuilder() .UseEnvironment("Testing") .UseStartup <TestStartup>(); _server = new TestServer(builder); Client = _server.CreateClient(); _dbContect = _server.Host.Services.GetService(typeof(FundTrackContext)) as FundTrackContext; //_unitOfWork = _server.Host.Services.GetService(typeof(IUnitOfWork)) as IUnitOfWork; TestTargetRepository = new TestTargetRepository(_dbContect); TestIncomeReportRepository = new TestIncomeReportRepository(_dbContect); TestFinOpRepository = new TestFinOpRepository(_dbContect); }
/// <summary> /// Initializes a new instance of the <see cref="UserRepository"/> class. /// </summary> /// <param name="context">The context.</param> public UserRepository(FundTrackContext context) { this.context = context; }
public TargetRepositoryTests() { this._fakeBuilder = new FakeFundTrackDbContextBaseBuilder(); this._fakeBuilder.SetTargets(); this._context = this._fakeBuilder.GetFakeContext(); }
public TestFinOpRepository(FundTrackContext dbContext) { _dbContext = dbContext; }
public TestIncomeReportRepository(FundTrackContext dbContext) { _dbContext = dbContext; }
/// <summary> /// Initializes a new instance of the <see cref="OrganizationRegistrationRepositoryTest"/> class. /// </summary> public OrganizationRegistrationRepositoryTest() { this._fakeBuilder = new FakeFundTrackDbContextBaseBuilder(); this._fakeBuilder.SetOrganizations(); this._context = this._fakeBuilder.GetFakeContext(); }
public TestTargetRepository(FundTrackContext dbContext) { _dbContext = dbContext; }
/// <summary> /// Initializes a new instance of the <see cref="PhoneRepositoryTest"/> class. /// </summary> public PhoneRepositoryTest() { this._fakeBuilder = new FakeFundTrackDbContextBaseBuilder(); this._fakeBuilder.SetPhones(); this._context = this._fakeBuilder.GetFakeContext(); }
/// <summary> /// Creates the database context. /// </summary> /// <param name="options">The options.</param> public void CreateDbContext(DbContextOptions <FundTrackContext> options) { context = new FundTrackContext(options); }