Рефакторинг и монго

This commit is contained in:
Халимов Рустам
2026-03-19 16:01:51 +03:00
parent d61dfd217c
commit b2e454616d
58 changed files with 1087 additions and 3802 deletions
@@ -4,6 +4,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
using MediatR;
using NSubstitute;
using Xunit;
using Knot.Shared.Kernel;
@@ -18,6 +19,7 @@ public class SendMessageCommandHandlerTests
private readonly IChatRepository _chatRepository;
private readonly IMessageRepository _messageRepository;
private readonly IChatsUnitOfWork _unitOfWork;
private readonly IMediator _mediator;
private readonly SendMessageCommandHandler _handler;
public SendMessageCommandHandlerTests()
@@ -25,8 +27,9 @@ public class SendMessageCommandHandlerTests
_chatRepository = Substitute.For<IChatRepository>();
_messageRepository = Substitute.For<IMessageRepository>();
_unitOfWork = Substitute.For<IChatsUnitOfWork>();
_mediator = Substitute.For<IMediator>();
_handler = new SendMessageCommandHandler(_chatRepository, _messageRepository, _unitOfWork);
_handler = new SendMessageCommandHandler(_chatRepository, _messageRepository, _unitOfWork, _mediator);
}
[Fact]