public static async Task Initialize(CRSDbContext context) { var individualClient = "Osoba prywatna"; var institutionalClient = "Przedsiębiorca"; if (context.TypeofCustomer.Any()) { return; } var typesOfCustomer = new TypeOfCustomer[] { new TypeOfCustomer { TypeName = individualClient }, new TypeOfCustomer { TypeName = institutionalClient } }; foreach (var item in typesOfCustomer) { await context.AddAsync(item); } await context.SaveChangesAsync(); }
public Customer(string firstName, string lastName, string email, TypeOfCustomer customerType) { FirstName = firstName; LastName = lastName; Email = email; CustomerType = customerType; }
void Awake() { _myTransform = transform; //Boy or girl? int rnd = Random.Range(0, 2); if (rnd == 0) { Boy.SetActive(true); Girl.SetActive(false); CustomerAnimator = Boy.GetComponent <Animator>(); } else { Girl.SetActive(true); Boy.SetActive(false); CustomerAnimator = Girl.GetComponent <Animator>(); } //Size variety float rndSize = Random.Range(.8f, 1f); _myTransform.localScale = new Vector3(rndSize, rndSize, rndSize); //Set Customer type if (StoreManager.Singleton.TotalDaysPlayed > 28) { int rndType = Random.Range(0, 101); if (EconomyManager.Singleton.ExtraPopularItemNames.Count == 0) { if (rndType < 10) { CustomerType = TypeOfCustomer.NeedsSpecificItem; } } else { if (rndType < 45) { CustomerType = TypeOfCustomer.NeedsSpecificItem; } } } }
public void AddAndGetItemsToEmailRepo_ShouldBeCorrect() { EmailRepository _emailRepo = new EmailRepository(); TypeOfCustomer customer = new TypeOfCustomer(); TypeOfCustomer customerTwo = new TypeOfCustomer(); TypeOfCustomer customerThree = new TypeOfCustomer(); _emailRepo.AddCustomer(customer); _emailRepo.AddCustomer(customerTwo); _emailRepo.AddCustomer(customerThree); int actual = _emailRepo.GetTypeOfCustomers().Count; int expected = 3; Assert.AreEqual(expected, actual); }
public void RemoveFromEmailList_ShouldBeCorrect() { EmailRepository _emailRepo = new EmailRepository(); TypeOfCustomer customer = new TypeOfCustomer(); TypeOfCustomer customerTwo = new TypeOfCustomer(); TypeOfCustomer customerThree = new TypeOfCustomer(); _emailRepo.AddCustomer(customer); _emailRepo.AddCustomer(customerTwo); _emailRepo.AddCustomer(customerThree); _emailRepo.RemoveCustomerDetail(customer); int actual = _emailRepo.GetTypeOfCustomers().Count; int expected = 2; Assert.AreEqual(expected, actual); }
public Customer(string address, TypeOfCustomer type) { this.Address = address; this.TypeOfCustomer = type; }
public Customer(TypeOfCustomer customerType, string customerName, uint customerID) { this.CustomerType = customerType; this.CustomerName = customerName; this.CustomerID = customerID; }