Example #1
0
        public Dictionary <string, ProductType> ProductGetAllMock()
        {
            Dictionary <string, ProductType> products = new Dictionary <string, ProductType>();
            ProductType product1 = new ProductType();

            product1.Id = 1;
            product1.ProductTypeGUID = "CABINETGUID";
            product1.Name            = "Cabinet";
            product1.SKU             = "AAABBBCCC111";
            product1.Description     = "This cabinet is made of the finest foo";


            // First mock product
            ProductTypeOptionGroup ProductTypeOptionGroup1 = new ProductTypeOptionGroup();

            ProductTypeOptionGroup1.Id            = 1;
            ProductTypeOptionGroup1.Name          = "Wood";
            ProductTypeOptionGroup1.Description   = "Choose what kind of wood you'd like for this cabinet";
            ProductTypeOptionGroup1.AllowMultiple = false;
            ProductTypeOptionGroup1.GUID          = "WOODOPTIONGROUPGUID";


            // Product Options
            ProductTypeOptions WoodOption1 = new ProductTypeOptions();

            WoodOption1.Id          = 1;
            WoodOption1.Name        = "Oak";
            WoodOption1.Description = "Oak is great!";
            WoodOption1.GUID        = "OAKOPTIONGUID";

            ProductTypeOptions WoodOption2 = new ProductTypeOptions();

            WoodOption2.Id          = 2;
            WoodOption2.Name        = "Walnut";
            WoodOption2.Description = "Walnut is great!";
            WoodOption2.GUID        = "WALNUTOPTIONGUID";

            ProductTypeOptionGroup1.OptionIndexOrAdd(WoodOption1);
            ProductTypeOptionGroup1.OptionIndexOrAdd(WoodOption2);

            ProductTypeOptionGroup ProductTypeOptionGroup2 = new ProductTypeOptionGroup();

            ProductTypeOptionGroup2.Id            = 2;
            ProductTypeOptionGroup2.Name          = "Chrome";
            ProductTypeOptionGroup2.Description   = "Choose what kind of chrome you'd like for this cabinet";
            ProductTypeOptionGroup2.AllowMultiple = false;
            ProductTypeOptionGroup2.GUID          = "CHROMEOPTIONGROUPGUID";

            ProductTypeOptions ChromeOption1 = new ProductTypeOptions();

            ChromeOption1.Id          = 3;
            ChromeOption1.Name        = "Silver";
            ChromeOption1.Description = "Silver is great!";
            ChromeOption1.GUID        = "SILVEROPTIONGUID";

            ProductTypeOptions ChromeOption2 = new ProductTypeOptions();

            ChromeOption2.Id          = 4;
            ChromeOption2.Name        = "Gold";
            ChromeOption2.Description = "Gold is great!";
            ChromeOption2.GUID        = "GoldOPTIONGUID";

            ProductTypeOptionGroup2.OptionIndexOrAdd(ChromeOption1);
            ProductTypeOptionGroup2.OptionIndexOrAdd(ChromeOption2);

            product1.OptionGroupIndexOrAdd(ProductTypeOptionGroup1);
            product1.OptionGroupIndexOrAdd(ProductTypeOptionGroup2);



            //  ProductAddOns
            ProductTypeAddOn AddOn1 = new ProductTypeAddOn();

            AddOn1.Id          = 1;
            AddOn1.Name        = "Extra Drawer";
            AddOn1.GUID        = "EXTRADRAWERGUID";
            AddOn1.Description = "This is an extra drawer if you'd like it";
            product1.AddOnIndexOrAdd(AddOn1);

            // Finally add the product
            products.Add(product1.ProductTypeGUID, product1);

            // Second mock product
            ProductType product2 = new ProductType();

            product2.Id = 2;
            product2.ProductTypeGUID = "TABLENOOPTIONS";
            product2.Name            = "Stone Table";
            product2.SKU             = "DDDEEEFFF222";
            product2.Description     = "This table is a stone table with no options or add ons";
            products.Add(product2.ProductTypeGUID, product2);
            return(products);
        }