コード例 #1
0
 public MessagePublished(MessageId id, UserId author, string content)
     : this()
 {
     Content = content;
     Id = id;
     Author = author;
 }
コード例 #2
0
ファイル: UserIdTest.cs プロジェクト: assafwe/mixter-old
        public void WhenCreate2IdWithSameEmailsThenAreEquals()
        {
            var userId1 = new UserId(UserEmail);
            var userId2 = new UserId(UserEmail);

            Check.That(userId1).IsEqualTo(userId2);
        }
コード例 #3
0
 public TimelineMessageProjection(UserId ownerId, UserId authorId, string content, MessageId messageId)
     : this()
 {
     OwnerId = ownerId;
     AuthorId = authorId;
     Content = content;
     MessageId = messageId;
 }
コード例 #4
0
        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));
        }
コード例 #5
0
 public ReplyMessagePublished(
     MessageId replyId, 
     UserId replier, 
     string replyContent, 
     MessageId parentId)
     : this()
 {
     ReplyId = replyId;
     Replier = replier;
     ReplyContent = replyContent;
     ParentId = parentId;
 }
コード例 #6
0
 public IEnumerable<TimelineMessageProjection> GetMessagesOfUser(UserId userId)
 {
     return _messages.Where(o => o.OwnerId.Equals(userId));
 }
コード例 #7
0
 public TimelineMessageProjection(UserId ownerId, ReplyMessagePublished evt)
     : this(ownerId, evt.Replier, evt.ReplyContent, evt.ReplyId)
 {
 }
コード例 #8
0
 public TimelineMessageProjection(UserId ownerId, MessagePublished evt)
     : this(ownerId, evt.Author, evt.Content, evt.Id)
 {
 }
コード例 #9
0
 public MessageDescription(UserId author, string content)
     : this()
 {
     Author = author;
     Content = content;
 }
コード例 #10
0
 public TimelineMessageId(UserId owner, MessageId messageId)
     : this()
 {
     Owner = owner;
     MessageId = messageId;
 }
コード例 #11
0
ファイル: UserIdTest.cs プロジェクト: assafwe/mixter-old
        public void WhenToStringIdThenEmail()
        {
            var userId1 = new UserId(UserEmail);

            Check.That(userId1.ToString()).IsEqualTo(UserEmail);
        }
コード例 #12
0
ファイル: SubscriptionId.cs プロジェクト: assafwe/mixter-old
 public SubscriptionId(UserId follower, UserId followee)
     : this()
 {
     Follower = follower;
     Followee = followee;
 }
コード例 #13
0
ファイル: Subscription.cs プロジェクト: assafwe/mixter-old
 public static void FollowUser(IEventPublisher eventPublisher, UserId follower, UserId followee)
 {
 }