From ae18c049338dfcb33f721eeeb0a05571e8bd87a9 Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 30 May 2024 08:02:40 +0000 Subject: Rename StateEvent to LegacyMatrixEvent --- Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs | 16 ++++++++-------- Tests/LibMatrix.Tests/Tests/RoomTests.cs | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'Tests/LibMatrix.Tests') diff --git a/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs b/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs index 2a380fc..4534ce6 100644 --- a/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs +++ b/Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs @@ -14,29 +14,29 @@ public static class RoomAbstraction { // Visibility = CreateRoomVisibility.Public, RoomAliasName = Guid.NewGuid().ToString() }; - crq.InitialState ??= new List(); - crq.InitialState.Add(new StateEvent() { + crq.InitialState ??= new List(); + crq.InitialState.Add(new LegacyMatrixEvent() { Type = "m.room.topic", StateKey = "", TypedContent = new RoomTopicEventContent() { Topic = "LibMatrix Test Room " + DateTime.Now.ToString("O") } }); - crq.InitialState.Add(new StateEvent() { + crq.InitialState.Add(new LegacyMatrixEvent() { Type = "m.room.name", StateKey = "", TypedContent = new RoomNameEventContent() { Name = "LibMatrix Test Room " + DateTime.Now.ToString("O") } }); - crq.InitialState.Add(new StateEvent() { + crq.InitialState.Add(new LegacyMatrixEvent() { Type = "m.room.avatar", StateKey = "", TypedContent = new RoomAvatarEventContent() { Url = "mxc://conduit.rory.gay/r9KiT0f9eQbv8pv4RxwBZFuzhfKjGWHx" } }); - crq.InitialState.Add(new StateEvent() { + crq.InitialState.Add(new LegacyMatrixEvent() { Type = "m.room.aliases", StateKey = "", TypedContent = new RoomAliasEventContent() { @@ -60,7 +60,7 @@ public static class RoomAbstraction { Name = $"LibMatrix Test Space ({roomCount} children)", // Visibility = CreateRoomVisibility.Public, RoomAliasName = Guid.NewGuid().ToString(), - InitialState = new List() + InitialState = new List() }; crq.CreationContentBaseType.Type = "m.space"; @@ -72,7 +72,7 @@ public static class RoomAbstraction { })).ToAsyncEnumerable(); await foreach (var room in createRoomTasks) - crq.InitialState.Add(new StateEvent { + crq.InitialState.Add(new LegacyMatrixEvent { Type = "m.space.child", StateKey = room.RoomId, TypedContent = new SpaceChildEventContent() { @@ -85,7 +85,7 @@ public static class RoomAbstraction { if (addSpaces) for (var i = 0; i < roomCount; i++) { var space = await GetTestSpace(hs, roomCount - spaceSizeReduction, true, spaceSizeReduction); - crq.InitialState.Add(new StateEvent { + crq.InitialState.Add(new LegacyMatrixEvent { Type = "m.space.child", StateKey = space.RoomId, TypedContent = new SpaceChildEventContent() { diff --git a/Tests/LibMatrix.Tests/Tests/RoomTests.cs b/Tests/LibMatrix.Tests/Tests/RoomTests.cs index 4c8dcb4..f212af4 100644 --- a/Tests/LibMatrix.Tests/Tests/RoomTests.cs +++ b/Tests/LibMatrix.Tests/Tests/RoomTests.cs @@ -43,8 +43,8 @@ public class RoomTests : TestBed { [Fact] public async Task GetMembersAsync() { - Assert.True(StateEvent.KnownStateEventTypes is { Count: > 0 }, "StateEvent.KnownStateEventTypes is empty!"); - Assert.True(StateEvent.KnownStateEventTypesByName is { Count: > 0 }, "StateEvent.KnownStateEventTypesByName is empty!"); + Assert.True(LegacyMatrixEvent.KnownStateEventTypes is { Count: > 0 }, "StateEvent.KnownStateEventTypes is empty!"); + Assert.True(LegacyMatrixEvent.KnownStateEventTypesByName is { Count: > 0 }, "StateEvent.KnownStateEventTypesByName is empty!"); var hs = await HomeserverAbstraction.GetHomeserver(); var room = await RoomAbstraction.GetTestRoom(hs); -- cgit 1.4.1