public void convertAPIToAPI() { OneSpanSign.API.AttachmentFile apiAttachmentFile1 = createApiAttachmentFile(); OneSpanSign.API.AttachmentFile apiAttachmentFile2 = new AttachmentFileConverter(apiAttachmentFile1).ToApiAttachmentFile(); Assert.IsNotNull(apiAttachmentFile2); Assert.AreEqual(apiAttachmentFile2, apiAttachmentFile1); }
private OneSpanSign.API.AttachmentFile createApiAttachmentFile() { OneSpanSign.API.AttachmentFile apiAttachmentFile = new OneSpanSign.API.AttachmentFile(); apiAttachmentFile.Id = 1; apiAttachmentFile.SetInsertDate(NOW.Ticks); apiAttachmentFile.Name = "apiAttachmentFile.jpeg"; apiAttachmentFile.Preview = true; return(apiAttachmentFile); }
public void convertAPIToSDK() { OneSpanSign.API.AttachmentFile apiAttachmentFile1 = createApiAttachmentFile(); OneSpanSign.Sdk.AttachmentFile sdkAttachmentFile1 = new AttachmentFileConverter(apiAttachmentFile1).ToSDKAttachmentFile(); Assert.IsNotNull(sdkAttachmentFile1); Assert.AreEqual(sdkAttachmentFile1.Id, apiAttachmentFile1.Id); Assert.AreEqual(sdkAttachmentFile1.InsertDate, apiAttachmentFile1.GetInsertDate()); Assert.AreEqual(sdkAttachmentFile1.Name, apiAttachmentFile1.Name); Assert.AreEqual(sdkAttachmentFile1.Preview, apiAttachmentFile1.Preview); }
public AttachmentFileConverter(OneSpanSign.API.AttachmentFile apiAttachmentFile) { this.apiAttachmentFile = apiAttachmentFile; }