about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests/Fixtures
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2024-05-30 21:39:12 +0200
committerEmma [it/its]@Rory& <root@rory.gay>2024-05-30 21:39:12 +0200
commit4bdea63982dae9c17b7a5fbda38d505655b8d4b3 (patch)
tree8ca9c6bad5f9526c5b36d707f08406fc3bbe2848 /Tests/LibMatrix.Tests/Fixtures
parentLog warning if registering a duplicate type (diff)
downloadLibMatrix-4bdea63982dae9c17b7a5fbda38d505655b8d4b3.tar.xz
Diffstat (limited to 'Tests/LibMatrix.Tests/Fixtures')
-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()