public static Discount Create(ICustomerRepository customerRepository_iCustomerRepository) { Discount discount = new Discount(customerRepository_iCustomerRepository); return discount; // TODO: Edit factory method of Discount // This method should be able to configure the object in all possible ways. // Add as many parameters as needed, // and assign their values to each field by using the API. }
public void TestMethod1(int customerId) { var repository = new SICustomerRepository(); repository.GetCustomerInt32 = (int custId) => { return new Customer(PexChoose.Value<Level>("level"), PexChoose.Value<int>("points")); }; var discount = new Discount(repository); discount.CalculateCustomerDiscount(customerId); }