Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Oct 31, 2024
1 parent 2d71e4a commit b37c901
Showing 1 changed file with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,24 @@ public class MessageSerializationTests {
private static final List<Message> 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")))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b37c901

Please sign in to comment.