Permalink
Browse files

failing test for attachment parsing

  • Loading branch information...
1 parent 368a495 commit 1ec749be7a7e4f6b7c379e925bbf22f77dd58a3f @jmarnold committed Mar 26, 2012
@@ -0,0 +1 @@
+Hello
@@ -87,6 +87,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
+ <ItemGroup>
+ <Content Include="Attachment1.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -21,9 +21,12 @@ public void BeforeAll()
theMessage.Bcc.Add("blind@domain.com");
theServer.Start();
+ SmtpLog.Level = LogLevel.Debug;
using (var client = new SmtpClient("localhost", 8181))
{
client.Send(theMessage);
+
+ theMessage.Attachments.Add(new Attachment("Attachment1.txt"));
client.Send(theMessage);
}
@@ -48,5 +51,15 @@ public void receives_multiple_messages()
{
theServer.ReceivedMessages().ShouldHaveCount(2);
}
+
+ [Test]
+ public void receives_attachments()
+ {
+ theServer
+ .ReceivedMessages()
+ .Last()
+ .Attachments
+ .ShouldHaveCount(1);
+ }
}
}

0 comments on commit 1ec749b

Please sign in to comment.