Beispiel #1
0
        public void Setup()
        {
            this.simpleFactory = ChefMariano.Instance;

            this.coffeeFM = CoffeeFactory.Instance;
            this.pizzaFM  = VegePizzaFactory.Instance;

            this.withRegistration = PizzaFactoryWithRegistration.Instance;

            withRegistration.Register("meat", () => new Capriciosa());
            withRegistration.Register("vege", () => new Margherita());

            this.withReflection = PastaFactoryWithReflection.Instance;
            withReflection.Register("meatDish", typeof(BologneseSpaghetti));
            withReflection.Register("vegeDish", typeof(PestoSpaghetti));
        }
Beispiel #2
0
 public void Setup()
 {
     chef = ChefMariano.Instance;
 }