示例#1
0
 public MealPlanTests()
 {
     builder          = new StudentOfficeBuilder();
     sut              = new MealPlanDirector();
     preparator       = new MealPlanConcreteBuilder();
     veggiepreparator = new MealPlanConcreteBuilderVeggie();
     sut.Assembler    = preparator;
     john             = builder.john;
 }
 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);
 }