Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. [Test]
  2. public void Name_HasErrorWhenNull()
  3. {
  4. new CreateTableDtoValidator().ShouldHaveValidationErrorFor(t => t.Name, (string)null);
  5. }
  6.  
  7. [Test]
  8. public void Name_DoesNotHaveErrorWhenValid()
  9. {
  10. new CreateTableDtoValidator().ShouldNotHaveValidationErrorFor(t => t.Name, "Table 1");
  11. }
  12.  
  13. [Test]
  14. public void Name_HasErrorWhenTooLong()
  15. {
  16. new CreateTableDtoValidator().ShouldHaveValidationErrorFor(t => t.Name, new string('a', 51));
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement