Example #1
0
        private static void Main(string[] args)
        {
            ICustomer alex = new Customer
            {
                Name  = "Alex",
                Email = "*****@*****.**",
                Phone = "0712 121 212"
            };

            IStore fordStore  = CreateFordStore();
            IStore skodaStore = CreateSkodaStore();

            fordStore.Visit(alex);

            IOrder fordOrderForAlex = fordStore.OrderCar(alex, "Focus", 28);

            fordStore.ConfirmOrder(1, 10);

            skodaStore.Visit(alex);

            IOrder skodaOrderForAlex = skodaStore.OrderCar(alex, "Fabia", 21);

            skodaStore.ConfirmOrder(2, 0);

            fordStore.CancelOrder(fordOrderForAlex.Nr);

            skodaStore.ReceiveOrder(skodaOrderForAlex.Nr);
            skodaStore.DeliverOrder(skodaOrderForAlex.Nr);

            IIssue iss1 = skodaStore.ReportProblem(2, $"front spoiler problem reported by {alex.Name}");

            skodaStore.CheckProblem(iss1, 2);
            skodaStore.FixProblem(iss1);

            Console.ReadKey();
        }