Beispiel #1
0
        public void Default()
        {
            collector.Process(null, Logger);
            string expected = "";

            Assert.AreEqual(expected, Content);
        }
Beispiel #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);
        }
Beispiel #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);
        }