public Message(Database.POCO.Message messageEntity, User sender) { this.Id = messageEntity.MessageId; this.Subject = messageEntity.Subject; this.MessageBody = messageEntity.MessageBody; this.Sender = sender; this.ReceivedTime = messageEntity.ReceivedTime; initCollections(); }
private static void AssertMessagesEqual(Message expected, Database.POCO.Message actual) { Assert.Equal(expected.Subject, actual.Subject); Assert.Equal(expected.MessageBody, actual.MessageBody); Assert.Equal(expected.Sender.Email, actual.Sender.Email); Assert.Equal(Emails(expected.Receivers), Emails(actual.Receivers)); Assert.Equal(Emails(expected.CC), Emails(actual.CC)); Assert.Equal(Emails(expected.BCC), Emails(actual.BCC)); Assert.Equal(expected.ReceivedTime, actual.ReceivedTime); // TODO: compare attachments! }