Strip comments and dedupe normalized literals in backend tests

- Remove all // and /// comments from the backend test suite.
- Replace hardcoded normalized-form string literals (e.g. NormalizedTitle/
  NormalizedName duplicating a title/name in upper case) with a variable
  plus .ToUpperInvariant(), so the two values can't drift apart.
This commit is contained in:
2026-09-10 02:45:11 +02:00
parent 5658dd24ff
commit c418844178
14 changed files with 29 additions and 110 deletions
@@ -4,12 +4,6 @@ using Xunit;
namespace Musify.Application.Tests.TestSupport
{
/// <summary>
/// Base class for handler tests: gives every test method its own empty, isolated
/// <see cref="TestDatabase"/> (xUnit creates a new instance of the test class per test method,
/// so there is no state to reset between tests) and a no-op logger factory for handlers that
/// take an <see cref="ILogger{TCategoryName}"/>.
/// </summary>
public abstract class HandlerTestBase : IAsyncLifetime
{
private TestDatabase database = null!;
@@ -22,7 +16,6 @@ namespace Musify.Application.Tests.TestSupport
protected static ILogger<T> NoOpLogger<T>() => NullLogger<T>.Instance;
/// <summary>Adds the entities and persists them, so handlers under test see committed data.</summary>
protected async Task SeedAsync(params object[] entities)
{
foreach (var entity in entities)