예제 #1
0
 private EmailMessage Get(EmailMessageData data)
 {
     return(new EmailMessage(data.Subject, data.Body, data.From, EmailMessageData.Split(data.To), data.EmailSenderUserId)
     {
         CopyTo = EmailMessageData.Split(data.CopyTo),
         Files = _serializer.Deserialize <FileHolder[]>(data.Files),
         IsBodyHtml = data.IsBodyHtml
     });
 }
예제 #2
0
        private EmailMessageData Add(int partitionId)
        {
            var data = _fixture.Build <EmailMessageData>()
                       .With(x => x.EmailSenderUserId, TestConstants.TestAdminUserId)
                       .With(x => x.To, EmailMessageData.Join(_fixture.CreateMany <string>()))
                       .With(x => x.CopyTo, EmailMessageData.Join(_fixture.CreateMany <string>()))
                       .Without(x => x.Id)
                       .Create();

            _messages.Add(
                partitionId,
                data.EmailSenderUserId,
                data.From,
                EmailMessageData.Split(data.To),
                EmailMessageData.Split(data.CopyTo),
                data.Subject,
                data.Body,
                data.IsBodyHtml,
                data.Files);

            return(data);
        }