コード例 #1
0
        public void GetTemplateInfoTest()
        {
            try
            {
                ReportingCloud rc = new ReportingCloud(sUsername, sPassword, uriBasePath);

                // upload 1 more document with unique file name
                byte[] bDocument     = File.ReadAllBytes("documents/test.doc");
                string sTempFilename = "test" + Guid.NewGuid().ToString() + ".doc";
                rc.UploadTemplate(sTempFilename, bDocument);

                // get template information
                TemplateInfo templateInfo = rc.GetTemplateInfo(sTempFilename);

                // check, if images are created
                Assert.IsFalse(templateInfo.TemplateName == "");

                // delete temp file
                rc.DeleteTemplate(sTempFilename);
            }
            catch (Exception exc)
            {
                Assert.Fail(exc.Message);
            }
        }