From b37c901836e13109e93cb11c488e15f949c2eb16 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 31 Oct 2024 17:14:49 +0000 Subject: [PATCH] test: fix tests --- .../network/MessageSerializationTests.java | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java b/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java index 7dd7c0ed..06355ba0 100644 --- a/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java +++ b/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java @@ -40,29 +40,24 @@ public class MessageSerializationTests { private static final List TEST_MESSAGES = List.of( Message.builder() .type(Message.MessageType.REQUEST_USER_LIST) - .target("TestTarget") + .target("TestTarget", Message.TargetType.PLAYER) .payload(Payload.empty()) .build(), Message.builder() .type(Message.MessageType.TELEPORT_REQUEST) - .target("TestTarget") + .target("TestTarget", Message.TargetType.PLAYER) .payload(Payload.position( Position.at(63.25, 127.43, -32, 180f, -94.3f, World.from("TestWorld", UUID.randomUUID()), "TestServer"))) .build(), Message.builder() .type(Message.MessageType.TELEPORT_TO_NETWORKED_USER) - .target("TestTarget") + .target("TestTarget", Message.TargetType.PLAYER) .payload(Payload.string("TestString")) .build(), - Message.builder() - .type(Message.MessageType.UPDATE_USER_LIST) - .target("TestTarget") - .payload(Payload.withStringList(List.of("TestString1", "TestString2", "TestString3"))) - .build(), Message.builder() .type(Message.MessageType.TELEPORT_TO_POSITION) - .target("TestTarget") + .target("TestTarget", Message.TargetType.PLAYER) .payload(Payload.position( Position.at(63.25, 127.43, -32, 180f, -94.3f, World.from("TestWorld", UUID.randomUUID()), "TestServer"))) @@ -90,14 +85,6 @@ public void testMessageSerialization(@NotNull Message message, @SuppressWarnings message.getPayload().getString().isPresent(), deserialized.getPayload().getString().isPresent() ); - Assertions.assertEquals( - message.getPayload().getStringList().isPresent(), - deserialized.getPayload().getStringList().isPresent()) - ; - Assertions.assertEquals( - message.getPayload().getStringList().isPresent(), - deserialized.getPayload().getStringList().isPresent() - ); } @NotNull