about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests/Fixtures
diff options
context:
space:
mode:
Diffstat (limited to '')
-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()