Created
January 26, 2016 22:58
-
-
Save plioi/f0a1a59297de20b95557 to your computer and use it in GitHub Desktop.
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
public class ContactEditTests | |
{ | |
... | |
public void ShouldRequireMinimumFields() | |
{ | |
new ContactEdit.Command() | |
.ShouldNotValidate("'Name' should not be empty."); | |
} | |
public void ShouldRequireValidEmailWhenProvided(ContactEdit.Command command) | |
{ | |
command.Email = null; | |
command.ShouldValidate(); | |
command.Email = "test@example.com"; | |
command.ShouldValidate(); | |
command.Email = "test at example dot com"; | |
command.ShouldNotValidate("'Email' is not a valid email address."); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment