Пример #1
0
        public void GetCategory2CS()
        {
            GetCategory2CSCall api = new GetCategory2CSCall(this.apiContext);
            // Return version only
            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
            DetailLevelCodeType.ReturnAll
            };
            api.DetailLevelList = new DetailLevelCodeTypeCollection(detailLevels);
            api.CategoryID = "279";   //Children's Book

            //api.CategoryID = "64355";   //Cell Phones
            api.Timeout = 300000;

            string message=string.Empty;

            // Make API call.
            CategoryTypeCollection cats = api.GetCategory2CS();

            Assert.IsNotNull(cats);
            Assert.IsNotNull(api.AttributeSystemVersionResponse);
            int ver = Int32.Parse(api.AttributeSystemVersionResponse);
            Assert.IsTrue(ver > 0);
            Assert.IsNotNull(api.SiteWideCharacteristicList);
            TestData.Category2CS = cats;

            IAttributesMaster attrMaster = new AttributesMaster();
            ICategoryCSProvider catCSDownLoader = new CategoryCSDownloader(apiContext);
            attrMaster.CategoryCSProvider = catCSDownLoader;
            int[] catIds = catCSDownLoader.GetSiteWideCharSetsAttrIds("48514");
            Assert.IsNotNull(catIds);
        }