System.Net.Mail.Tests.AttachmentTest.ContentType C# (CSharp) Method

ContentType() private method

private ContentType ( ) : void
return void
        public void ContentType()
        {
            Attachment attach = Attachment.CreateAttachmentFromString("test", "attachment-name");
            Assert.NotNull(attach.ContentType);
            Assert.Equal("text/plain", attach.ContentType.MediaType);
            Attachment a2 = new Attachment(new MemoryStream(), "myname");
            Assert.NotNull(a2.ContentType);
            Assert.Equal("application/octet-stream", a2.ContentType.MediaType);
        }