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:
@@ -58,7 +58,7 @@ public class ListShowsTests
|
||||
);
|
||||
|
||||
// Ролики-врезки живут на своей странице и в общей библиотеке только мешали бы.
|
||||
Assert.Equal(new[] { "Автофильм", "Сериал" }, shows.Select(s => s.Name).ToArray());
|
||||
Assert.Equal(["Автофильм", "Сериал"], shows.Select(s => s.Name).ToArray());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -77,7 +77,7 @@ public class ListShowsTests
|
||||
Assert.Equal(2, series.SeasonCount);
|
||||
Assert.True(series.HasPoster);
|
||||
Assert.Equal("Боевик", series.PrimaryGenre);
|
||||
Assert.Equal(new[] { "Драма" }, series.OtherGenres.ToArray());
|
||||
Assert.Equal(["Драма"], series.OtherGenres.ToArray());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user