From 5affd9f061e75f6575a2fe6715f9e8757cfe87e8 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Thu, 14 Dec 2023 07:20:46 +0100 Subject: Cleanup --- Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs | 3 ++- Tests/LibMatrix.Tests/Tests/RoomEventTests.cs | 7 ++----- Tests/LibMatrix.Tests/Tests/RoomTests.cs | 1 - Tests/LibMatrix.Tests/Tests/TestCleanup.cs | 6 ++---- 4 files changed, 6 insertions(+), 11 deletions(-) (limited to 'Tests/LibMatrix.Tests') 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 { 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 { - private readonly TestFixture _fixture; + // private readonly TestFixture _fixture; private readonly HomeserverResolverService _resolver; private readonly Config _config; private readonly HomeserverProviderService _provider; private readonly ILogger _logger; public TestCleanup(ITestOutputHelper testOutputHelper, TestFixture fixture) : base(testOutputHelper, fixture) { - _fixture = fixture; + // _fixture = fixture; _resolver = _fixture.GetService(_testOutputHelper) ?? throw new InvalidOperationException($"Failed to get {nameof(HomeserverResolverService)}"); _config = _fixture.GetService(_testOutputHelper) ?? throw new InvalidOperationException($"Failed to get {nameof(Config)}"); _provider = _fixture.GetService(_testOutputHelper) ?? throw new InvalidOperationException($"Failed to get {nameof(HomeserverProviderService)}"); -- cgit 1.4.1