public void GetProductFinderXSL()
 {
     GetProductFinderXSLCall api = new GetProductFinderXSLCall(this.apiContext);
     api.DetailLevelList = new DetailLevelCodeTypeCollection();
     api.DetailLevelList.Add(DetailLevelCodeType.ReturnAll) ;
     // Make API call.
     XSLFileTypeCollection xsl = api.GetProductFinderXSL();
 }
示例#2
0
        private void BtnGetProductFinderXSL_Click(object sender, System.EventArgs e)
        {
            try
            {
                GetProductFinderXSLCall apicall = new GetProductFinderXSLCall(Context);
                apicall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll);

                XSLFileTypeCollection attfiles = apicall.GetProductFinderXSL();
                GetProductFinderXSLCall.DecodeFileContent(attfiles[0]);
                TxtAttributeData.Text = attfiles[0].FileContent.Replace("\n", "\r\n");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public void GetProductFinderXSLFull()
        {
            GetProductFinderXSLCall api = new GetProductFinderXSLCall(this.apiContext);
            api.DetailLevelList = new DetailLevelCodeTypeCollection();
            api.DetailLevelList.Add(DetailLevelCodeType.ReturnAll) ;
            // Make API call.
            XSLFileTypeCollection xsl = api.GetProductFinderXSL();

            //check whether the call is success.
            Assert.IsTrue(api.ApiResponse.Ack==AckCodeType.Success || api.ApiResponse.Ack==AckCodeType.Warning,"do not success!");
            //the following property must return their values.
            Assert.IsNotNull(xsl);
            Assert.Greater(xsl.Count,0);
            Assert.Greater(xsl[0].FileName.Length,0);
            Assert.Greater(xsl[0].FileVersion.Length,0);
            Assert.Greater(xsl[0].FileContent.Length,0);
        }