Пример #1
0
        public void TestPostPageReplaceText()
        {
            PdfApi target = new PdfApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "test.pdf";
            int? pageNumber = 1;
            string storage = null;
            string folder = null;

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

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

            Com.Aspose.PDF.Model.PageTextReplaceResponse actual;
            actual = target.PostPageReplaceText(name, pageNumber, storage, folder, body);

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