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:
@@ -8,8 +8,6 @@ namespace Musify.Api.Tests.Extensions
|
||||
{
|
||||
public sealed class ErrorOrHttpExtensionsTests
|
||||
{
|
||||
// The concrete IResult types (NoContent, UnauthorizedHttpResult, ...) resolve logging/problem-
|
||||
// details services from HttpContext.RequestServices when they execute, so it can't be empty.
|
||||
private static readonly IServiceProvider Services = new ServiceCollection().AddLogging().AddProblemDetails().BuildServiceProvider();
|
||||
|
||||
private static async Task<(int StatusCode, string Body)> ExecuteAsync(IResult result)
|
||||
|
||||
Reference in New Issue
Block a user