예제 #1
0
 public void TimestampIsRequiredForPost()
 {
     var p = new PostBuilder().Build().Post;
     p.Timestamp = default(DateTime);
     Assert.Throws<ValidationException>(() => p.Validate());
 }
예제 #2
0
 public void PostbuilderBuildsValidPost()
 {
     var p = new PostBuilder().Build().Post;
     p.Validate();
 }
예제 #3
0
 public void TitleIsRequiredForPost()
 {
     var p = new PostBuilder().Build().Post;
     p.Title = "";
     Assert.Throws<ValidationException>(() => p.Validate());
 }