Форматирование

This commit is contained in:
Халимов Рустам
2026-03-19 01:31:43 +03:00
parent 282b43d4c1
commit 8f2de0e9bf
90 changed files with 901 additions and 299 deletions
@@ -27,7 +27,7 @@ public class GetOrCreateFavoritesCommandHandlerTests
// Arrange
var userId = Guid.NewGuid();
var existingChat = Chat.Create("Избранное", ChatType.Favorites);
_chatRepository.GetFavoritesAsync(userId, Arg.Any<CancellationToken>())
.Returns(existingChat);
@@ -39,7 +39,7 @@ public class GetOrCreateFavoritesCommandHandlerTests
// Assert
result.IsSuccess.Should().BeTrue();
result.Value.Should().Be(existingChat.Id);
_chatRepository.DidNotReceive().Add(Arg.Any<Chat>());
await _unitOfWork.DidNotReceive().SaveChangesAsync(Arg.Any<CancellationToken>());
}
@@ -60,12 +60,12 @@ public class GetOrCreateFavoritesCommandHandlerTests
// Assert
result.IsSuccess.Should().BeTrue();
result.Value.Should().NotBeEmpty();
_chatRepository.Received(1).Add(Arg.Is<Chat>(c =>
c.Type == ChatType.Favorites &&
_chatRepository.Received(1).Add(Arg.Is<Chat>(c =>
c.Type == ChatType.Favorites &&
c.Name == "Избранное" &&
c.Members.Any(m => m.UserId == userId)));
await _unitOfWork.Received(1).SaveChangesAsync(Arg.Any<CancellationToken>());
}
}