Skip to content

Commit

Permalink
Extra handling of resource data to avoid a rare issue with test faili…
Browse files Browse the repository at this point in the history
…ng because of lineending miss on git checkout.
  • Loading branch information
NiKiZe committed Nov 23, 2013
1 parent fd6b212 commit d892d32
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tests/MessageBuilderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ public void MessageWithAttachment() {
[TestMethod]
[TestCategory("BuildMessageFromMIME822")]
public void MessageWithQuotedPrintables() {
// Lineending \r\n fixes making sure resource data have CrLf in case
// of inconsistensy in resource from git checkout. Noted in Issue #37
MailMessage m = MessageBuilder.FromMIME822(
Properties.Resources.MailWithQuotedPrintables);
Properties.Resources.MailWithQuotedPrintables.
Replace("\r\n", "\n").Replace("\n", "\r\n"));
// Ensure the constructed body is identical to our resource string.
Assert.AreEqual<string>(Properties.Resources.QuotedPrintableText,
Assert.AreEqual<string>(Properties.Resources.QuotedPrintableText.
Replace("\r\n", "\n").Replace("\n", "\r\n"),
m.Body);
}

Expand Down

0 comments on commit d892d32

Please sign in to comment.