Files
Govor/Govor.API.Tests/IntegrationTests/Hubs/ChatsHubTests.cs
T
Artemy 65a43c09d3 Refactor message service and move tests to Application.Tests
Renamed IMessageService to IMessageCommandService and updated all usages accordingly. Moved and renamed test files from Govor.API.Tests to the new Govor.Application.Tests project, updating namespaces to match. Refactored message-related services and controllers to use the new naming and structure. Added Govor.Application.Tests project to the solution.
2025-07-10 18:05:10 +07:00

43 lines
1.2 KiB
C#

using AutoFixture;
using Govor.API.Hubs;
using Govor.Application.Interfaces;
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<IMessageCommandService> _messageServiceMock;
private Mock<IUserGroupsService> _userGroupsServiceMock;
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<IMessageCommandService>();
_userGroupsServiceMock = new Mock<IUserGroupsService>();
_loggerMock = new Mock<ILogger<ChatsHub>>();
_chatsHub = new ChatsHub(
_loggerMock.Object,
_messageServiceMock.Object,
_userGroupsServiceMock.Object
);
}
// Test for Send action
[Test]
public void SendMessage_Success()
{
}
}