refactor: split MessageStructure into multiple messages, as a starting point for proper implementation of the login standard

This commit is contained in:
2021-05-28 14:51:17 +02:00
parent a92f437412
commit b871b4d3a4
6 changed files with 73 additions and 32 deletions

View File

@ -8,12 +8,11 @@ import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*;
import uulm.teamname.marvelous.gamelibrary.entities.Entity;
import uulm.teamname.marvelous.gamelibrary.entities.EntityID;
import uulm.teamname.marvelous.gamelibrary.events.Event;
import uulm.teamname.marvelous.gamelibrary.events.EventBuilder;
import uulm.teamname.marvelous.gamelibrary.events.EventType;
import uulm.teamname.marvelous.gamelibrary.json.ingame.MessageStructure;
import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage;
import java.util.HashMap;
@ -25,7 +24,7 @@ class JSONTest {
String[] messageStructureEnd;
/** Still need to add: messages, messageType */
MessageStructure target;
EventMessage target;
@BeforeEach
void setUp() {
@ -56,7 +55,7 @@ class JSONTest {
}
""",
};
target = new MessageStructure();
target = new EventMessage();
target.customContentType = "TestCustomContent";
target.customContent = new HashMap<String, Object>();
target.customContent.put("customKey", "customResult");