Addition Tests for MessageRepository

+ MessagesValidator tests
This commit is contained in:
Artemy
2025-06-20 14:02:08 +07:00
parent 3526cde06f
commit 3f1c050149
3 changed files with 182 additions and 2 deletions
@@ -20,8 +20,8 @@ public class MessageValidator : IObjectValidator<Message>
throw new ArgumentException("Encrypted content cannot be empty", nameof(message.EncryptedContent));
if(message.IsEdited && message.EditedAt == DateTime.MinValue)
throw new ArgumentException("Edited at time cannot be empty", nameof(message.EditedAt));
if (message.EditedAt == DateTime.MinValue)
throw new ArgumentException("Edited at time cannot be empty", nameof(message.EditedAt));
if (message.SentAt == DateTime.MinValue)
throw new ArgumentException("Sent at time cannot be empty", nameof(message.EditedAt));
}
catch (Exception ex)
{