- StorageServiceTests: replace out-param + manual dispose with IAsyncLifetime - PictureServiceTests: Assert.True bound checks -> Assert.InRange - CreateAlbumCommandHandlerTests: assert the specific NotFound error type instead of just IsError, matching what the test name promises - CreateAlbumRequestValidatorTests: replace a boundary Theory that computed its expected result inline with explicit Facts against the real AlbumReleaseYear constants - Remove unused using directives across a handful of production and test files found during the review Full suite verified green: 250/250 tests passing, 0 build warnings.
27 lines
1.3 KiB
C#
27 lines
1.3 KiB
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Musify.Application.Configuration;
|
|
using Musify.Application.Services;
|
|
|
|
namespace Musify.Application;
|
|
|
|
public static class ApplicationDependencyInjection
|
|
{
|
|
public static IServiceCollection AddApplication(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
services.AddMediator();
|
|
services.AddScoped<UploadIntentValidator>();
|
|
services.AddScoped<TrackStreamIssuer>();
|
|
services.AddScoped<YouTubeTrackProvisioner>();
|
|
|
|
services.AddValidatedOptions<ApplicationStorageConfiguration>(configuration, ApplicationStorageConfiguration.SectionName);
|
|
services.AddValidatedOptions<PlayListConfiguration>(configuration, PlayListConfiguration.SectionName);
|
|
services.AddValidatedOptions<TrackConfiguration>(configuration, TrackConfiguration.SectionName);
|
|
services.AddValidatedOptions<MixConfiguration>(configuration, MixConfiguration.SectionName);
|
|
services.AddValidatedOptions<StreamGatewayConfiguration>(configuration, StreamGatewayConfiguration.SectionName);
|
|
services.AddValidatedOptions<UploadIntentConfiguration>(configuration, UploadIntentConfiguration.SectionName);
|
|
|
|
return services;
|
|
}
|
|
}
|