public PaymentsFixture(ServiceProviderFixture serviceProviderFixture) : base(serviceProviderFixture) { this.PaymentsToDelete = new List <Payment>(); this.customerFixture = new CustomerFixture(serviceProviderFixture); this.typeFixture = new TypeFixture(serviceProviderFixture); this.statesFixture = new StatesFixture(serviceProviderFixture); }
public void InitializeWithOneCustomer(FTStoreDbContext context) { var customer = new CustomerFixture().GetValid(CustomerFixture.ID); context.Customers.Add(customer); context.SaveChanges(); context.Entry(customer).State = EntityState.Detached; }
protected override OrderTable GetModelPrototype(int id = 0) { var product = new ProductFixture().GetValid(); var customer = new CustomerFixture().GetValid(); var paymentMethod = PaymentMethodFixture.GetValid(); return(new OrderFixture().GetValid(customer, product, paymentMethod)); }
public OrderRepositoryTest( ContextFixture contextFixture, AutoMapperFixture autoMapperFixture, ProductFixture productPrototype, CustomerFixture customerPrototype, OrderFixture orderPrototype) : base(contextFixture, autoMapperFixture) { _productPrototype = productPrototype; _customerPrototype = customerPrototype; _orderPrototype = orderPrototype; }
public OrdersFixture(ServiceProviderFixture serviceProviderFixture) : base(serviceProviderFixture) { this.OrdersToDelete = new List <Order>(); this.cartFixture = new CartFixture(serviceProviderFixture); this.productFixture = new ProductFixture(serviceProviderFixture); this.customerFixture = new CustomerFixture(serviceProviderFixture); this.channelFixture = new ChannelFixture(serviceProviderFixture); this.statesFixture = new StatesFixture(serviceProviderFixture); this.typeFixture = new TypeFixture(serviceProviderFixture); this.paymentsFixture = new PaymentsFixture(serviceProviderFixture); this.projectFixture = new ProjectFixture(serviceProviderFixture); }
public CartFixture(ServiceProviderFixture serviceProviderFixture) : base(serviceProviderFixture) { this.CartToDelete = new List <Cart>(); this.customerFixture = new CustomerFixture(serviceProviderFixture); this.productFixture = new ProductFixture(serviceProviderFixture); this.shippingMethodsFixture = new ShippingMethodsFixture(serviceProviderFixture); this.taxCategoryFixture = new TaxCategoryFixture(serviceProviderFixture); this.discountCodeFixture = new DiscountCodeFixture(serviceProviderFixture); this.customerGroupFixture = new CustomerGroupFixture(serviceProviderFixture); this.typeFixture = new TypeFixture(serviceProviderFixture); this.shoppingListFixture = new ShoppingListFixture(serviceProviderFixture); this.paymentsFixture = new PaymentsFixture(serviceProviderFixture); this.projectFixture = new ProjectFixture(serviceProviderFixture); }
public static void Main(String[] args) { CustomerFixture fixture = new CustomerFixture(); fixture.CreateCustomer("test", "test", "email", "1433", "code1"); fixture.CreateBusinessPartner("code1", "test", "IBAN"); var value1 = fixture.HasBusinessPartner("code1", "test", "IBAN"); Console.WriteLine(value1); var value = fixture.HasBusinessPartner("code1", "tester", "IBAN1"); Console.Write(value); Console.ReadKey(); //Console.ReadKey(); }
public async Task SaveAsyncShouldAddANewCustomer() { using var scope = ServiceProvider.CreateScope(); var sut = scope.ServiceProvider.GetRequiredService <ICustomerService>(); var unitOfWork = scope.ServiceProvider.GetRequiredService <IUnitOfWork>(); var context = scope.ServiceProvider.GetRequiredService <ApplicationContext>(); var address = await SeedDatabaseFixture.AddDummyAddressAsync(context); var result = await sut.SaveAsync(CustomerFixture.GetDummyCustomer(), new [] { address.Uuid }); await unitOfWork.SaveChangesAsync(); var customer = await context.Customers.Include(x => x.Addresses).FirstAsync(); Assert.True(result.IsSuccessful); Assert.Equal(CustomerFixture.Name, customer.Name); Assert.NotEqual(default, customer.Email);
public CustomerCalculatedTests(CustomerFixture customerFixture) { _customerFixture = customerFixture; }
public CustomerTests(CustomerFixture customerFixture) { _customerFixture = customerFixture; }
public ShoppingListFixture(ServiceProviderFixture serviceProviderFixture) : base(serviceProviderFixture) { this.ShoppingListToDelete = new List <ShoppingList>(); this.customerFixture = new CustomerFixture(serviceProviderFixture); this.productFixture = new ProductFixture(serviceProviderFixture); }
public ShoppingListFixture() : base() { this.ShoppingListToDelete = new List <ShoppingList>(); this.customerFixture = new CustomerFixture(); this.productFixture = new ProductFixture(); }