Refactor collection and group suggestion handling to improve name comparison logic
Updated the CreateCollectionFromSuggestionCommandHandler and CreateGroupFromSuggestionCommandHandler to compare names in memory rather than using SQL queries for case-insensitive checks. This change addresses potential discrepancies with SQL's case sensitivity, particularly with special characters. Additionally, modified unit tests to use array syntax for assertions, enhancing readability and consistency across the test suite.
This commit is contained in:
@@ -54,8 +54,13 @@ public class UploadsCleanupTests : IDisposable
|
||||
[Fact]
|
||||
public void Sweep_SurvivesMissingDirectory()
|
||||
{
|
||||
// Каталога может не быть на самом первом старте — это не повод падать.
|
||||
UploadsCleaner.Sweep(Paths(), TimeSpan.FromHours(24), NullLogger.Instance);
|
||||
// Каталога может не быть на самом первом старте — это не повод падать. И заводить его
|
||||
// уборка тоже не должна: каталоги создаёт хранилище, когда в них появляется нужда.
|
||||
var paths = Paths();
|
||||
|
||||
UploadsCleaner.Sweep(paths, TimeSpan.FromHours(24), NullLogger.Instance);
|
||||
|
||||
Assert.False(Directory.Exists(paths.UploadsDir));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user