about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-05-30 08:02:40 +0000
committerRory& <root@rory.gay>2024-05-30 08:02:40 +0000
commitae18c049338dfcb33f721eeeb0a05571e8bd87a9 (patch)
tree9e73ae6a42a310efe43c6a9ed7d13ce19e0cbde5 /Tests/LibMatrix.Tests
parentLog warning if registering a duplicate type (diff)
downloadLibMatrix-ae18c049338dfcb33f721eeeb0a05571e8bd87a9.tar.xz
Rename StateEvent to LegacyMatrixEvent
Diffstat (limited to 'Tests/LibMatrix.Tests')
-rw-r--r--Tests/LibMatrix.Tests/Abstractions/RoomAbstraction.cs16
-rw-r--r--Tests/LibMatrix.Tests/Tests/RoomTests.cs4
2 files changed, 10 insertions, 10 deletions
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<StateEvent>();
-        crq.InitialState.Add(new StateEvent() {
+        crq.InitialState ??= new List<LegacyMatrixEvent>();
+        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<StateEvent>()
+            InitialState = new List<LegacyMatrixEvent>()
         };
         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<TestFixture> {
 
     [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);