Exemplo n.º 1
0
        public void TestPostDocumentReplaceText()
        {
            PdfApi target = new PdfApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "test.pdf";
            string storage = null;
            string folder = null;

            Com.Aspose.PDF.Model.TextReplace body = new Com.Aspose.PDF.Model.TextReplace();
            body.NewValue = "This is the new test added by IA";

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\pdf\\resources\\" + name));

            Com.Aspose.PDF.Model.DocumentTextReplaceResponse actual;
            actual = target.PostDocumentReplaceText(name, storage, folder, body);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.PDF.Model.DocumentTextReplaceResponse(), actual.GetType());
        }