Ejemplo n.º 1
0
        public static void Main()
        {
            AbstractSoupFactory concreteSoupFactory = new BostonConcreteSoupFactory();
            Soup soupOfTheDay = MakeSoupOfTheDay(concreteSoupFactory);
            Tapper tap = new Tapper();
            tap.test("Boston soup of the day test " , ("The Soup of the day " + concreteSoupFactory.getFactoryLocation() + " is " + soupOfTheDay.getSoupName() )  , ("The Soup of the day Boston is Tofu Soup"));

            concreteSoupFactory = new HonoluluConcreteSoupFactory();
            soupOfTheDay = MakeSoupOfTheDay(concreteSoupFactory);
            tap.test("Honolulu soup of the day test " , ("The Soup of the day " + concreteSoupFactory.getFactoryLocation() + " is " + soupOfTheDay.getSoupName() )  , ("The Soup of the day Honolulu is Tofu Soup"));
            tap.done();
        }
Ejemplo n.º 2
0
        public static void Main()
        {
            AbstractSoupFactory concreteSoupFactory = new BostonConcreteSoupFactory();
            Soup   soupOfTheDay = MakeSoupOfTheDay(concreteSoupFactory);
            Tapper tap          = new Tapper();

            tap.test("Boston soup of the day test ", ("The Soup of the day " + concreteSoupFactory.getFactoryLocation() + " is " + soupOfTheDay.getSoupName()), ("The Soup of the day Boston is Tofu Soup"));

            concreteSoupFactory = new HonoluluConcreteSoupFactory();
            soupOfTheDay        = MakeSoupOfTheDay(concreteSoupFactory);
            tap.test("Honolulu soup of the day test ", ("The Soup of the day " + concreteSoupFactory.getFactoryLocation() + " is " + soupOfTheDay.getSoupName()), ("The Soup of the day Honolulu is Tofu Soup"));
            tap.done();
        }