about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests/Fixtures/TestFixture.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-09-17 04:28:20 +0200
committerRory& <root@rory.gay>2024-09-17 04:28:20 +0200
commit92b139e41afd41f3bd3987c14208966d020a948b (patch)
treee21c6ad5bb0c833a8151c9b60bc4f1de22fa5c8d /Tests/LibMatrix.Tests/Fixtures/TestFixture.cs
parentMerge remote-tracking branch 'origin/dev/project-cleanup' (diff)
parentWorking json canonicalisation (diff)
downloadLibMatrix-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.cs28
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()