public MessagePublished(MessageId id, UserId author, string content) : this() { Content = content; Id = id; Author = author; }
public void WhenCreate2IdWithSameEmailsThenAreEquals() { var userId1 = new UserId(UserEmail); var userId2 = new UserId(UserEmail); Check.That(userId1).IsEqualTo(userId2); }
public TimelineMessageProjection(UserId ownerId, UserId authorId, string content, MessageId messageId) : this() { OwnerId = ownerId; AuthorId = authorId; Content = content; MessageId = messageId; }
public void WhenHandleMessageRepliedThenSaveTimelineMessageProjectionForReplier() { var parentMessageId = MessageId.Generate(); var replier = new UserId("*****@*****.**"); _handler.Handle(new ReplyMessagePublished(MessageId, replier, Content, parentMessageId)); Check.That(_repository.GetMessagesOfUser(replier)) .ContainsExactly(new TimelineMessageProjection(replier, replier, Content, MessageId)); }
public ReplyMessagePublished( MessageId replyId, UserId replier, string replyContent, MessageId parentId) : this() { ReplyId = replyId; Replier = replier; ReplyContent = replyContent; ParentId = parentId; }
public IEnumerable<TimelineMessageProjection> GetMessagesOfUser(UserId userId) { return _messages.Where(o => o.OwnerId.Equals(userId)); }
public TimelineMessageProjection(UserId ownerId, ReplyMessagePublished evt) : this(ownerId, evt.Replier, evt.ReplyContent, evt.ReplyId) { }
public TimelineMessageProjection(UserId ownerId, MessagePublished evt) : this(ownerId, evt.Author, evt.Content, evt.Id) { }
public MessageDescription(UserId author, string content) : this() { Author = author; Content = content; }
public TimelineMessageId(UserId owner, MessageId messageId) : this() { Owner = owner; MessageId = messageId; }
public void WhenToStringIdThenEmail() { var userId1 = new UserId(UserEmail); Check.That(userId1.ToString()).IsEqualTo(UserEmail); }
public SubscriptionId(UserId follower, UserId followee) : this() { Follower = follower; Followee = followee; }
public static void FollowUser(IEventPublisher eventPublisher, UserId follower, UserId followee) { }