-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide MailboxAddress accessors for LocalPart and Domain.
Fixes issue #766
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,20 @@ public void ArgumentExceptionTests () | |
Assert.DoesNotThrow (() => new SecureMailboxAddress (Encoding.UTF8, "Routed Address", new[] { "route1", "route2", "route3" }, "[email protected]", "ffff")); | ||
} | ||
|
||
[Test] | ||
public void TestLocalPartAndDomain () | ||
{ | ||
var mailbox = new MailboxAddress ("User Name", "[email protected]"); | ||
|
||
Assert.AreEqual ("user", mailbox.LocalPart, "LocalPart"); | ||
Assert.AreEqual ("domain.com", mailbox.Domain, "Domain"); | ||
|
||
mailbox = new MailboxAddress ("User Name", "user"); | ||
|
||
Assert.AreEqual ("user", mailbox.LocalPart, "Unix LocalPart"); | ||
Assert.AreEqual (string.Empty, mailbox.Domain, "Unix non-Domain"); | ||
} | ||
|
||
[Test] | ||
public void TestSetEmptyAddress () | ||
{ | ||
|