AttachFile() private method

private AttachFile ( long objectId, string file, string contentType ) : Attachment
objectId long
file string
contentType string
return Smartsheet.Api.Models.Attachment
Example #1
0
        public virtual void TestAttachFile()
        {
            server.setResponseBody(@"..\..\..\TestSDK\resources\attachFile.json");
            string     file       = @"..\..\..\TestSDK\resources\large_sheet.pdf";
            Attachment attachment = associatedAttachment.AttachFile(1234L, file, "application/pdf");

            Assert.True(attachment.ID == 7265404226692996L);
            Assert.AreEqual("Testing.PDF", attachment.Name);
            Assert.AreEqual(AttachmentType.FILE, attachment.AttachmentType);
            Assert.AreEqual("application/pdf", attachment.MimeType);
            Assert.True(1831L == attachment.SizeInKb);
            Assert.AreEqual(AttachmentParentType.SHEET, attachment.ParentType);
        }