Archived
1
0
Fork 0

Fix EventBus test

This commit is contained in:
Moritz Ruth 2021-01-03 14:04:57 +01:00
parent d8d6f7e0a9
commit 91026b373d
3 changed files with 25 additions and 3 deletions

View file

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="test" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

View file

@ -4,4 +4,4 @@ import space.uranos.server.Server
private lateinit var serverInstance: Server
object Uranos : Server by serverInstance
val Uranos get() = serverInstance

View file

@ -29,7 +29,6 @@ class EventBusTest {
@BeforeEach
fun initServer() {
// Does not work because Uranos will not be reinitialized. When we use DI, we do no longer need this.
UranosServer.setServerInstance(UranosServer())
}
@ -87,8 +86,8 @@ class EventBusTest {
val order = listOf(
EventHandlerPosition.FIRST,
Position1,
EventHandlerPosition.NORMAL,
Position2,
EventHandlerPosition.NORMAL,
Position3,
EventHandlerPosition.LAST
)