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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user