Use block-scoped namespaces in the test suite

Converts all 73 test source files from file-scoped (namespace X;) to
block-scoped (namespace X { ... }) declarations, re-indenting their
contents accordingly. Matches the existing convention already used in
several production files (e.g. Musify.Infrastructure.Configuration,
Musify.Application.Contracts).

Mechanical change only, done with a script, verified with a full
rebuild (0 warnings, 0 errors) and test run (257/257 passing).
This commit is contained in:
2026-09-09 23:09:43 +02:00
parent 56e06ccd5f
commit b5700614c1
73 changed files with 3718 additions and 3645 deletions
@@ -1,40 +1,41 @@
using Musify.Application.Shared;
using Xunit;
namespace Musify.Application.Tests.Shared;
public sealed class StorageKeyTests
namespace Musify.Application.Tests.Shared
{
[Fact]
public void Combine_MultipleSegments_JoinsThemWithForwardSlashes()
public sealed class StorageKeyTests
{
var key = StorageKey.Combine("Tracks", "SmallPictures", "cover.webp");
[Fact]
public void Combine_MultipleSegments_JoinsThemWithForwardSlashes()
{
var key = StorageKey.Combine("Tracks", "SmallPictures", "cover.webp");
Assert.Equal("Tracks/SmallPictures/cover.webp", key);
}
Assert.Equal("Tracks/SmallPictures/cover.webp", key);
}
[Fact]
public void Combine_SegmentsWithSurroundingSlashesAndWhitespace_TrimsThem()
{
var key = StorageKey.Combine(" Tracks/ ", "/SmallPictures/", "cover.webp");
[Fact]
public void Combine_SegmentsWithSurroundingSlashesAndWhitespace_TrimsThem()
{
var key = StorageKey.Combine(" Tracks/ ", "/SmallPictures/", "cover.webp");
Assert.Equal("Tracks/SmallPictures/cover.webp", key);
}
Assert.Equal("Tracks/SmallPictures/cover.webp", key);
}
[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData(" ")]
public void Combine_BlankSegment_IsSkipped(string? blank)
{
var key = StorageKey.Combine("Tracks", blank!, "cover.webp");
[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData(" ")]
public void Combine_BlankSegment_IsSkipped(string? blank)
{
var key = StorageKey.Combine("Tracks", blank!, "cover.webp");
Assert.Equal("Tracks/cover.webp", key);
}
Assert.Equal("Tracks/cover.webp", key);
}
[Fact]
public void Combine_NoSegments_ReturnsEmptyString()
{
Assert.Equal(string.Empty, StorageKey.Combine());
[Fact]
public void Combine_NoSegments_ReturnsEmptyString()
{
Assert.Equal(string.Empty, StorageKey.Combine());
}
}
}