public Body ( string body ) : |
||
body | string | |
Résultat |
public void BuildCustomBody_PreparesCorrectDestination() { // Arrange var fromAddress = new MailAddress("*****@*****.**"); var toAddress = new MailAddress("*****@*****.**"); var anotherAddress = new MailAddress("*****@*****.**"); // Act var builder = new EmailDestinationBuilder(fromAddress, new[] { toAddress, anotherAddress }, ServerName); string result = builder.Body("Bizz").Build(); // Assert var expected = string.Format( "Type=Mail;From={0};To={1},{2};UseAttachment={3};CustomBody={4};SmtpServer={5};UseSSL=yes;Port=465;UseAuthentication=no;", fromAddress.Address, toAddress.Address, anotherAddress.Address, "false", "Bizz", ServerName); Assert.Equal(expected, result); }