Exemple #1
0
        private static IStore CreateFordStore()
        {
            IProducer ford = new Producer
            {
                Name    = "Ford",
                Address = "Ford address"
            };

            ICar fordFocus = new Car
            {
                Name     = "Focus",
                Price    = 16500,
                Producer = ford,
                Year     = new DateTime(2015, 1, 1)
            };

            ICar fordEcosport = new Car
            {
                Name     = "Ecosport",
                Price    = 18000,
                Producer = ford,
                Year     = new DateTime(2018, 1, 1)
            };

            IStore store = new Store
            {
                Name     = "Ford Store",
                Location = "Iasi"
            };

            store.AddCar(fordFocus);
            store.AddCar(fordEcosport);

            return(store);
        }
Exemple #2
0
        private static IStore CreateSkodaStore()
        {
            IProducer skoda = new Producer
            {
                Name    = "Skoda",
                Address = "Skoda address"
            };

            ICar skodaFabia = new Car
            {
                Name     = "Fabia",
                Price    = 14000,
                Producer = skoda,
                Year     = new DateTime(2018, 1, 1)
            };

            ICar skodaOctavia = new Car
            {
                Name     = "Octavia",
                Price    = 19000,
                Producer = skoda,
                Year     = new DateTime(2017, 1, 1)
            };

            IStore store = new Store
            {
                Name     = "Skoda Store",
                Location = "Iasi"
            };

            store.AddCar(skodaFabia);
            store.AddCar(skodaOctavia);

            return(store);
        }