Форматирование
This commit is contained in:
+6
-6
@@ -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>());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user