Files
Govor/Govor.API.Tests/IntegrationTests/Hubs/ChatsHubTests.cs
T
Artemy 2cb6a93060 Add private chat support and group model enhancements
Introduces repositories, validators, and integration tests for private chats. Refactors group-related models to support invitations and memberships, updates group repository interfaces and implementations, and enhances message service logic to handle private chat creation and retrieval. Also registers new services and validators in DI, and updates related tests.
2025-07-07 13:55:29 +07:00

35 lines
933 B
C#

using AutoFixture;
using Govor.API.Hubs;
using Govor.Application.Interfaces.Messages;
using Microsoft.Extensions.Logging;
using Moq;
namespace Govor.API.Tests.IntegrationTests.Hubs;
[TestFixture]
public class ChatsHubTests
{
private Mock<ILogger<ChatsHub>> _loggerMock;
private Mock<IMessageService> _messageServiceMock;
private Fixture _fixture;
private ChatsHub _chatsHub;
[SetUp]
public void SetUp()
{
_fixture = new Fixture();
_fixture.Behaviors.OfType<ThrowingRecursionBehavior>().ToList().ForEach(b => _fixture.Behaviors.Remove(b));
_fixture.Behaviors.Add(new OmitOnRecursionBehavior());
_messageServiceMock = new Mock<IMessageService>();
_loggerMock = new Mock<ILogger<ChatsHub>>();
_chatsHub = new ChatsHub(
_loggerMock.Object,
_messageServiceMock.Object
);
}
// Test for Send action
}