public void Default() { collector.Process(null, Logger); string expected = ""; Assert.AreEqual(expected, Content); }
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); }
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); }