From 478fc1b0ef855530e1e93c5212d154280f9d7dd8 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 24 Oct 2023 17:44:03 +0200 Subject: Minor cleanup --- Tests/LibMatrix.Tests/Tests/RoomTests.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Tests') diff --git a/Tests/LibMatrix.Tests/Tests/RoomTests.cs b/Tests/LibMatrix.Tests/Tests/RoomTests.cs index 72a2775..65f1cca 100644 --- a/Tests/LibMatrix.Tests/Tests/RoomTests.cs +++ b/Tests/LibMatrix.Tests/Tests/RoomTests.cs @@ -2,6 +2,7 @@ using System.Text; using ArcaneLibs.Extensions; using LibMatrix.EventTypes.Spec.State; using LibMatrix.Homeservers; +using LibMatrix.Responses; using LibMatrix.Services; using LibMatrix.Tests.Abstractions; using LibMatrix.Tests.Fixtures; @@ -150,11 +151,11 @@ public class RoomTests : TestBed { var room = await RoomAbstraction.GetTestRoom(hs); Assert.NotNull(room); - await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", new ProfileResponseEventContent() { + await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", new UserProfileResponse() { DisplayName = "wee_woo", AvatarUrl = "no" }); - await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", "state_key_maybe", new ProfileResponseEventContent() { + await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", "state_key_maybe", new UserProfileResponse() { DisplayName = "wee_woo", AvatarUrl = "yes" }); @@ -167,16 +168,16 @@ public class RoomTests : TestBed { var room = await RoomAbstraction.GetTestRoom(hs); Assert.NotNull(room); - await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", new ProfileResponseEventContent() { + await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", new UserProfileResponse() { DisplayName = "wee_woo", AvatarUrl = "no" }); - await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", "state_key_maybe", new ProfileResponseEventContent() { + await room.SendStateEventAsync("gay.rory.libmatrix.unit_tests", "state_key_maybe", new UserProfileResponse() { DisplayName = "wee_woo", AvatarUrl = "yes" }); - var state1 = await room.GetStateAsync("gay.rory.libmatrix.unit_tests"); + var state1 = await room.GetStateAsync("gay.rory.libmatrix.unit_tests"); Assert.NotNull(state1); Assert.NotNull(state1.DisplayName); Assert.NotEmpty(state1.DisplayName); @@ -185,7 +186,7 @@ public class RoomTests : TestBed { Assert.Equal("wee_woo", state1.DisplayName); Assert.Equal("no", state1.AvatarUrl); - var state2 = await room.GetStateAsync("gay.rory.libmatrix.unit_tests", "state_key_maybe"); + var state2 = await room.GetStateAsync("gay.rory.libmatrix.unit_tests", "state_key_maybe"); Assert.NotNull(state2); Assert.NotNull(state2.DisplayName); Assert.NotEmpty(state2.DisplayName); -- cgit 1.4.1