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:
+40
-39
@@ -2,57 +2,58 @@ using ErrorOr;
|
||||
using Musify.Infrastructure.Services;
|
||||
using Xunit;
|
||||
|
||||
namespace Musify.Infrastructure.Tests.Services;
|
||||
|
||||
public sealed class DisabledYouTubeMusicServiceTests
|
||||
namespace Musify.Infrastructure.Tests.Services
|
||||
{
|
||||
private readonly DisabledYouTubeMusicService service = new();
|
||||
|
||||
[Fact]
|
||||
public async Task SearchSongsAsync_ReturnsForbidden()
|
||||
public sealed class DisabledYouTubeMusicServiceTests
|
||||
{
|
||||
var result = await service.SearchSongsAsync("query", string.Empty, TestContext.Current.CancellationToken);
|
||||
private readonly DisabledYouTubeMusicService service = new();
|
||||
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
[Fact]
|
||||
public async Task SearchSongsAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.SearchSongsAsync("query", string.Empty, TestContext.Current.CancellationToken);
|
||||
|
||||
[Fact]
|
||||
public async Task SearchAlbumsAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.SearchAlbumsAsync("query", string.Empty, TestContext.Current.CancellationToken);
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
[Fact]
|
||||
public async Task SearchAlbumsAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.SearchAlbumsAsync("query", string.Empty, TestContext.Current.CancellationToken);
|
||||
|
||||
[Fact]
|
||||
public async Task GetAlbumAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.GetAlbumAsync("album-1", TestContext.Current.CancellationToken);
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
[Fact]
|
||||
public async Task GetAlbumAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.GetAlbumAsync("album-1", TestContext.Current.CancellationToken);
|
||||
|
||||
[Fact]
|
||||
public async Task GetAudioStreamAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.GetAudioStreamAsync("video-1", TestContext.Current.CancellationToken);
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
[Fact]
|
||||
public async Task GetAudioStreamAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.GetAudioStreamAsync("video-1", TestContext.Current.CancellationToken);
|
||||
|
||||
[Fact]
|
||||
public async Task GetSongAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.GetSongAsync("video-1", TestContext.Current.CancellationToken);
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
[Fact]
|
||||
public async Task GetSongAsync_ReturnsForbidden()
|
||||
{
|
||||
var result = await service.GetSongAsync("video-1", TestContext.Current.CancellationToken);
|
||||
|
||||
[Fact]
|
||||
public void ResolveArtworkUrl_ReturnsTheUrlUnchanged()
|
||||
{
|
||||
var result = service.ResolveArtworkUrl("https://img.example/thumb.jpg");
|
||||
Assert.Equal(ErrorType.Forbidden, result.FirstError.Type);
|
||||
}
|
||||
|
||||
Assert.Equal("https://img.example/thumb.jpg", result);
|
||||
[Fact]
|
||||
public void ResolveArtworkUrl_ReturnsTheUrlUnchanged()
|
||||
{
|
||||
var result = service.ResolveArtworkUrl("https://img.example/thumb.jpg");
|
||||
|
||||
Assert.Equal("https://img.example/thumb.jpg", result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user