about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LibMatrix.Tests')
-rw-r--r--Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs3
-rw-r--r--Tests/LibMatrix.Tests/Tests/RoomEventTests.cs7
-rw-r--r--Tests/LibMatrix.Tests/Tests/RoomTests.cs1
-rw-r--r--Tests/LibMatrix.Tests/Tests/TestCleanup.cs6
4 files changed, 6 insertions, 11 deletions
diff --git a/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs b/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs
index 76b8c8c..0cbcf75 100644
--- a/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs
+++ b/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs
@@ -1,5 +1,6 @@
 using ArcaneLibs.Extensions;
 using LibMatrix.EventTypes.Spec.State;
+using LibMatrix.EventTypes.Spec.State.RoomInfo;
 using LibMatrix.Homeservers;
 using LibMatrix.Responses;
 using LibMatrix.RoomTypes;
@@ -61,7 +62,7 @@ public static class RoomAbstraction {
             RoomAliasName = Guid.NewGuid().ToString(),
             InitialState = new()
         };
-        crq._creationContentBaseType.Type = "m.space";
+        crq.CreationContentBaseType.Type = "m.space";
 
 
         var createRoomTasks = Enumerable.Range(0, roomCount)
diff --git a/Tests/LibMatrix.Tests/Tests/RoomEventTests.cs b/Tests/LibMatrix.Tests/Tests/RoomEventTests.cs
index 6828087..060e6f2 100644
--- a/Tests/LibMatrix.Tests/Tests/RoomEventTests.cs
+++ b/Tests/LibMatrix.Tests/Tests/RoomEventTests.cs
@@ -1,6 +1,3 @@
-using System.Text;
-using ArcaneLibs.Extensions;
-using LibMatrix.EventTypes.Spec.State;
 using LibMatrix.Homeservers;
 using LibMatrix.Services;
 using LibMatrix.Tests.Abstractions;
@@ -88,8 +85,8 @@ public class RoomEventTests : TestBed<TestFixture> {
         Assert.NotNull(room);
         var rule = await room.GetJoinRuleAsync();
         Assert.NotNull(rule);
-        Assert.NotNull(rule.JoinRule);
-        Assert.NotEmpty(rule.JoinRule);
+        Assert.NotNull(rule.JoinRuleValue);
+        Assert.NotEmpty(rule.JoinRuleValue);
     }
 
     [Fact]
diff --git a/Tests/LibMatrix.Tests/Tests/RoomTests.cs b/Tests/LibMatrix.Tests/Tests/RoomTests.cs
index 3a11de9..913e044 100644
--- a/Tests/LibMatrix.Tests/Tests/RoomTests.cs
+++ b/Tests/LibMatrix.Tests/Tests/RoomTests.cs
@@ -1,5 +1,4 @@
 using System.Text;
-using ArcaneLibs.Extensions;
 using LibMatrix.EventTypes.Spec.State;
 using LibMatrix.Homeservers;
 using LibMatrix.Responses;
diff --git a/Tests/LibMatrix.Tests/Tests/TestCleanup.cs b/Tests/LibMatrix.Tests/Tests/TestCleanup.cs
index 8fb7443..d056345 100644
--- a/Tests/LibMatrix.Tests/Tests/TestCleanup.cs
+++ b/Tests/LibMatrix.Tests/Tests/TestCleanup.cs
@@ -1,9 +1,7 @@
 using System.Diagnostics;
-using ArcaneLibs.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Services;
 using LibMatrix.Tests.Abstractions;
-using LibMatrix.Tests.DataTests;
 using LibMatrix.Tests.Fixtures;
 using Microsoft.Extensions.Logging;
 using Xunit.Abstractions;
@@ -12,14 +10,14 @@ using Xunit.Microsoft.DependencyInjection.Abstracts;
 namespace LibMatrix.Tests.Tests;
 
 public class TestCleanup : TestBed<TestFixture> {
-    private readonly TestFixture _fixture;
+    // private readonly TestFixture _fixture;
     private readonly HomeserverResolverService _resolver;
     private readonly Config _config;
     private readonly HomeserverProviderService _provider;
     private readonly ILogger<TestCleanup> _logger;
 
     public TestCleanup(ITestOutputHelper testOutputHelper, TestFixture fixture) : base(testOutputHelper, fixture) {
-        _fixture = fixture;
+        // _fixture = fixture;
         _resolver = _fixture.GetService<HomeserverResolverService>(_testOutputHelper) ?? throw new InvalidOperationException($"Failed to get {nameof(HomeserverResolverService)}");
         _config = _fixture.GetService<Config>(_testOutputHelper) ?? throw new InvalidOperationException($"Failed to get {nameof(Config)}");
         _provider = _fixture.GetService<HomeserverProviderService>(_testOutputHelper) ?? throw new InvalidOperationException($"Failed to get {nameof(HomeserverProviderService)}");