mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Addition Tests for MessageRepository
+ MessagesValidator tests
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user