public SellingTests() { builder = new StudentOfficeBuilder(); sut = builder.office; john = builder.john; jane = builder.jane; sut.SellProduct(john, new Order(ProductGenerator.chips, 5)); sut.SellProduct(jane, new Order(ProductGenerator.chips, 3)); }
public void AddingOtherClientTest() { // Testing adding a single client of type OtherClient to an empty student office StudentOffice instantTest = new StudentOffice(); instantTest.AddClient(john, 0); Assert.Single(instantTest.ClientList); }
public void MealPlanSellingTest() { sut.CompleteMeal(ProductGenerator.sandwich, ProductGenerator.chocolatebar, ProductGenerator.water); StudentOffice studentoffice = builder.office; studentoffice.SellMealPlan(preparator, john); Assert.Equal(44.5m, studentoffice.ClientList[john]); }
public void TestOperatorEqual() { // Test of the == and != overrided operators for client StudentOffice office = new StudentOffice(); Client sameJohn = office.CreateClient("DOE", "john", 30, 1985); Assert.True(john == sameJohn); Assert.True(john != jane); }
internal StudentOfficeBuilder() { office = new StudentOffice(new Stock(1000m, new OrderingRepository())); commercial = office._commercial; stock = office.Stock; products = new ProductGenerator(commercial); mealPlanBuilder = new MealPlanDirector(); InitializeStock(); office.AddClient(john, 50); office.AddClient(jane, 50); stock.Attach(office); }
public TransactionTests() { office = new StudentOffice(new StubStock()); john = Clients.John(); office.AddClient(john, 15); }
public StudentOfficeTests() { builder = new StudentOfficeBuilder(); SUT = builder.office; john = Clients.John(); jane = Clients.Jane(); }
public MementoTests() { office = builder.office; builder.office.TransactionsList.Add(new Transaction(ProductGenerator.chips, 5, Clients.John())); }
public CommercialTests() { builder = new StudentOfficeBuilder(); office = builder.office; water = ProductGenerator.water; chips = ProductGenerator.chips; beer = ProductGenerator.beer; }