mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-02 22:12:02 +00:00
29 lines
1015 B
C#
29 lines
1015 B
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Spacebar.Sdk.Core;
|
|
using Spacebar.Tests.Abstractions;
|
|
using Xunit.Microsoft.DependencyInjection;
|
|
using Xunit.Microsoft.DependencyInjection.Abstracts;
|
|
|
|
namespace Spacebar.Tests.Fixtures;
|
|
|
|
public class TestFixture : TestBedFixture {
|
|
protected override void AddServices(IServiceCollection services, IConfiguration configuration) {
|
|
services.AddSingleton(configuration);
|
|
services.AddLogging();
|
|
|
|
services.AddSingleton<Config>();
|
|
services.AddSingleton<UserAbstraction>();
|
|
|
|
services.AddSingleton<SpacebarClientWellKnownResolverService>();
|
|
services.AddSingleton<SpacebarClientProviderService>();
|
|
|
|
}
|
|
|
|
protected override ValueTask DisposeAsyncCore()
|
|
=> new();
|
|
|
|
protected override IEnumerable<TestAppSettings> GetTestAppSettings() {
|
|
yield return new TestAppSettings { Filename = "appsettings.json", IsOptional = true };
|
|
}
|
|
} |