Skip to content

Commit

Permalink
Added a unit test for issue #135
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed May 4, 2015
1 parent 49d987a commit 02727ec
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions UnitTests/MimeMessageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,21 @@ public void TestMailMessageToMimeMessage ()

Assert.AreEqual (2, multipart.Count, "Expected 2 MIME parts within the multipart/alternative.");
}

[Test]
public void TestIssue135 ()
{
var message = new MimeMessage ();
message.Body = new TextPart ("plain") {
ContentTransferEncoding = ContentEncoding.Base64,
ContentObject = new ContentObject (new MemoryStream (new byte[1], false))
};

try {
message.ToString ();
} catch (Exception ex) {
Assert.Fail (ex.Message);
}
}
}
}

0 comments on commit 02727ec

Please sign in to comment.