AttachURL() private method

private AttachURL ( long objectId, Attachment attachment ) : Attachment
objectId long
attachment Smartsheet.Api.Models.Attachment
return Smartsheet.Api.Models.Attachment
Example #1
0
        public virtual void TestAttachURL()
        {
            server.setResponseBody(@"..\..\..\TestSDK\resources\attachLink.json");

            Attachment attachment = new Attachment();

            attachment.Url                = "http://www.smartsheet.com/sites/all/themes/blue_sky/logo.png";
            attachment.AttachmentType     = AttachmentType.LINK;
            attachment.UrlExpiresInMillis = 1L;
            attachment.AttachmentSubType  = AttachmentSubType.PDF;

            Attachment newAttachment = associatedAttachment.AttachURL(1234L, attachment);

            Assert.AreEqual("http://www.smartsheet.com/sites/all/themes/blue_sky/logo.png", newAttachment.Name);
            Assert.AreEqual(AttachmentType.LINK, newAttachment.AttachmentType);
        }