public void CanMakePlusAddressMailBox() { // arrange var parser = new SmtpParser(); IMailbox mailbox; // act var made = parser.TryMakeMailbox(new TokenEnumerator(new StringTokenReader("*****@*****.**")), out mailbox); // assert Assert.True(made); Assert.Equal("cain.osullivan+plus", mailbox.User); Assert.Equal("gmail.com", mailbox.Host); }
public void CanMakeMailbox(string email, string user, string host) { // arrange var parser = new SmtpParser(); IMailbox mailbox; // act var made = parser.TryMakeMailbox(new TokenEnumerator(new StringTokenReader(email)), out mailbox); // assert Assert.True(made); Assert.Equal(user, mailbox.User); Assert.Equal(host, mailbox.Host); }