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).
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using Musify.Application.Shared;
|
|
using Xunit;
|
|
|
|
namespace Musify.Application.Tests.Shared
|
|
{
|
|
public sealed class StorageKeyTests
|
|
{
|
|
[Fact]
|
|
public void Combine_MultipleSegments_JoinsThemWithForwardSlashes()
|
|
{
|
|
var key = StorageKey.Combine("Tracks", "SmallPictures", "cover.webp");
|
|
|
|
Assert.Equal("Tracks/SmallPictures/cover.webp", key);
|
|
}
|
|
|
|
[Fact]
|
|
public void Combine_SegmentsWithSurroundingSlashesAndWhitespace_TrimsThem()
|
|
{
|
|
var key = StorageKey.Combine(" Tracks/ ", "/SmallPictures/", "cover.webp");
|
|
|
|
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");
|
|
|
|
Assert.Equal("Tracks/cover.webp", key);
|
|
}
|
|
|
|
[Fact]
|
|
public void Combine_NoSegments_ReturnsEmptyString()
|
|
{
|
|
Assert.Equal(string.Empty, StorageKey.Combine());
|
|
}
|
|
}
|
|
}
|