diff options
author | Rory& <root@rory.gay> | 2024-09-17 04:28:20 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-09-17 04:28:20 +0200 |
commit | 92b139e41afd41f3bd3987c14208966d020a948b (patch) | |
tree | e21c6ad5bb0c833a8151c9b60bc4f1de22fa5c8d /Tests/LibMatrix.Tests/Fixtures/TestFixture.cs | |
parent | Merge remote-tracking branch 'origin/dev/project-cleanup' (diff) | |
parent | Working json canonicalisation (diff) | |
download | LibMatrix-92b139e41afd41f3bd3987c14208966d020a948b.tar.xz |
Merge remote-tracking branch 'origin/dev/e2ee{canonical-json}'
Diffstat (limited to 'Tests/LibMatrix.Tests/Fixtures/TestFixture.cs')
-rw-r--r-- | Tests/LibMatrix.Tests/Fixtures/TestFixture.cs | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Tests/LibMatrix.Tests/Fixtures/TestFixture.cs b/Tests/LibMatrix.Tests/Fixtures/TestFixture.cs index 35c8704..01a0d2f 100644 --- a/Tests/LibMatrix.Tests/Fixtures/TestFixture.cs +++ b/Tests/LibMatrix.Tests/Fixtures/TestFixture.cs @@ -1,5 +1,6 @@ using ArcaneLibs.Extensions; using LibMatrix.Services; +using LibMatrix.Tests.Abstractions; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Xunit.Microsoft.DependencyInjection; @@ -8,24 +9,19 @@ using Xunit.Microsoft.DependencyInjection.Abstracts; namespace LibMatrix.Tests.Fixtures; public class TestFixture : TestBedFixture { - protected override void AddServices(IServiceCollection services, IConfiguration? configuration) { - services.AddSingleton<TieredStorageService>(x => - new TieredStorageService( - null, - null - ) - ); + protected override void AddServices(IServiceCollection services, IConfiguration configuration) { + // services.AddSingleton<TieredStorageService>(x => + // new TieredStorageService( + // null, + // null + // ) + // ); + services.AddSingleton(configuration); services.AddRoryLibMatrixServices(); - - services.AddSingleton<Config>(config => { - var conf = new Config(); - configuration?.GetSection("Configuration").Bind(conf); - - File.WriteAllText("configuration.json", conf.ToJson()); - - return conf; - }); + services.AddLogging(); + services.AddSingleton<HomeserverAbstraction>(); + services.AddSingleton<Config>(); } protected override ValueTask DisposeAsyncCore() |