Ejemplo n.º 1
0
 public void Setup()
 {
     this.attachments           = new AttachmentCollection();
     this.additionalAttachments = new AttachmentCollection();
     this.collector             = new AttachmentsCollector(attachments, additionalAttachments);
     SetupCore();
 }
Ejemplo n.º 2
0
        public void EmptyAttachName()
        {
            attachments.Add(new Attachment()
            {
                MimeType = "image/png", Content = new byte[] { 0, 1, 2 }
            });
            this.collector = new AttachmentsCollector(attachments, additionalAttachments);
            collector.Process(null, Logger);
            string expected = @"""attachments"": [
],
";

            Assert.AreEqual(expected, Content);
        }
Ejemplo n.º 3
0
        public void SimpleAttach()
        {
            attachments.Add(new Attachment()
            {
                Name = "img", MimeType = "image/png", Content = new byte[] { 0, 1, 2 }
            });
            this.collector = new AttachmentsCollector(attachments, additionalAttachments);
            collector.Process(null, Logger);
            string expected = @"""attachments"": [
{
""name"":""img"",
""mimeType"":""image/png"",
""content"":""H4sIAAAAAAAEAGNgZAIAf4lUCAMAAAA="",
""compress"":""gzip"",
},
],
";

            Assert.AreEqual(expected, Content);
        }