public void TestPostCreateField() { PdfApi target = new PdfApi(APIKEY, APPSID, BASEPATH); StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH); string name = "test.pdf"; int? page = 1; string storage = null; string folder = null; Com.Aspose.PDF.Model.Field body = new Com.Aspose.PDF.Model.Field(); Com.Aspose.PDF.Model.Link link = new Com.Aspose.PDF.Model.Link(); link.Href = "http://api.aspose.com/v1.1/pdf/ABFillablewfields.pdf/fields/NewField"; link.Rel = "self"; link.Title = "NewField"; link.Type = "link"; Com.Aspose.PDF.Model.Rectangle rect = new Com.Aspose.PDF.Model.Rectangle(); rect.X = 0; rect.Y = 0; body.Name = "dvDate_1"; body.Values = new System.Collections.Generic.List<string> { "NewFieldValue" }; body.Rect = rect; body.SelectedItems = new System.Collections.Generic.List<int?> { 1 }; body.Type = 0; body.Links = new System.Collections.Generic.List<Com.Aspose.PDF.Model.Link> { link }; storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\pdf\\resources\\" + name)); Com.Aspose.PDF.Model.SaaSposeResponse actual; actual = target.PostCreateField(name, page, storage, folder, body); Assert.AreEqual("200", actual.Code); Assert.IsInstanceOfType(new Com.Aspose.PDF.Model.SaaSposeResponse(), actual.GetType()); }