Пример #1
0
 public void ToAttachmentData_Binary()
 {
     byte[] bytes = new byte[] { 1, 2, 3 };
     var attachment = new BinaryAttachment("name", MimeTypes.Binary, bytes);
     AttachmentData attachmentData = attachment.ToAttachmentData();
     Assert.AreEqual("name", attachmentData.Name);
     Assert.AreEqual(MimeTypes.Binary, attachmentData.ContentType);
     Assert.AreEqual(bytes, attachmentData.GetBytes());
     Assert.AreEqual(AttachmentContentDisposition.Inline, attachmentData.ContentDisposition);
     Assert.AreEqual(AttachmentType.Binary, attachmentData.Type);
 }
Пример #2
0
        public void ToAttachmentData_Binary()
        {
            byte[]         bytes          = new byte[] { 1, 2, 3 };
            var            attachment     = new BinaryAttachment("name", MimeTypes.Binary, bytes);
            AttachmentData attachmentData = attachment.ToAttachmentData();

            Assert.AreEqual("name", attachmentData.Name);
            Assert.AreEqual(MimeTypes.Binary, attachmentData.ContentType);
            Assert.AreEqual(bytes, attachmentData.GetBytes());
            Assert.AreEqual(AttachmentContentDisposition.Inline, attachmentData.ContentDisposition);
            Assert.AreEqual(AttachmentType.Binary, attachmentData.Type);
        }