AddCommentToProfile() public méthode

public AddCommentToProfile ( Comment comment ) : void
comment Comment
Résultat void
Exemple #1
0
 public void ShouldBeAbleToGetTheLatestComment()
 {
     var user1 = new User(new LoginId("*****@*****.**"), new Name("firstName1", "lastName1"));
     user1.AddCommentToProfile(new Comment(user1,user1,"This is the first comment",new GetInDate(new DateTime(2010,01,01))));
     user1.AddCommentToProfile(new Comment(user1,user1,"This is the second comment",new GetInDate(new DateTime(2010,02,03))));
     user1.AddCommentToProfile(new Comment(user1,user1,"This is the third comment",new GetInDate(new DateTime(2010,01,02))));
     Assert.AreEqual("This is the second comment",user1.GetLatestProfileComment().Content);
 }
Exemple #2
0
 public Comment(User commentor, User commentedOn, String content, GetInDate myDate)
 {
     Commentor = commentor;
     CommentedOn = commentedOn;
     Content = content;
     CommentedOn.AddCommentToProfile(this);
     CommentDate = myDate;
 }
Exemple #3
0
 public Comment(User commentor, User commentedOn, String content)
 {
     Commentor = commentor;
     CommentedOn = commentedOn;
     Content = content;
     CommentedOn.AddCommentToProfile(this);
     CommentDate = new GetInDate(DateTime.Now);
 }