public CustomerRepository( CustomerContext customerContext, ICustomerRepositoryHelper customerRepositoryHelper) { this.customerContext = customerContext; this.customerRepositoryHelper = customerRepositoryHelper; }
public void Setup() { this.databaseHelper = new DatabaseHelper(); this.customerRepositoryHelper = new CustomerRepositoryHelper(); this.customerRepositoryHelperMock = new Mock <ICustomerRepositoryHelper>(); this.customerContext = new CustomerContext(this.databaseHelper.GetDatabaseOptions()); this.customerRepository = new CustomerRepository(this.customerContext, this.customerRepositoryHelper); this.customerToBeAdded = new Customer { Id = 1, FirstName = "Jane", LastName = "Doe", EmailAddress = "*****@*****.**", Password = "******" }; }
public void Setup() { this.webApplicationFactory = new ApiWebApplicationFactory(); this.customerRepositoryHelper = new CustomerRepositoryHelper(); this.databaseHelper = new DatabaseHelper(); this.dbOptions = this.databaseHelper.GetDatabaseOptions(); this.httpClient = this.webApplicationFactory.CreateClient(); this.customerContext = new CustomerContext(this.dbOptions); this.customerRepository = new CustomerRepository(this.customerContext, this.customerRepositoryHelper); this.customerToBeAdded = new Customer { Id = 1, FirstName = "Jane", LastName = "Doe", EmailAddress = "*****@*****.**", Password = "******" }; }