mirror of
https://github.com/trainerlord/WorldSystem.git
synced 2024-12-02 13:23:21 +01:00
Added test
This commit is contained in:
parent
41b5ed6bc2
commit
e117fda5e8
15
pom.xml
15
pom.xml
@ -40,6 +40,7 @@
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
@ -48,6 +49,7 @@
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
@ -61,6 +63,19 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit47</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -18,9 +18,7 @@ public class AsyncCreatorAdapter implements CreatorAdapter {
|
||||
// Create worlds async to close #16
|
||||
@Override
|
||||
public void create(WorldCreator creator, SystemWorld sw, Runnable r) {
|
||||
TaskManager.IMP.async(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
TaskManager.IMP.async(() -> {
|
||||
AsyncWorld world;
|
||||
if (Bukkit.getWorld(creator.name()) == null)
|
||||
world = AsyncWorld.create(creator);
|
||||
@ -38,7 +36,6 @@ public class AsyncCreatorAdapter implements CreatorAdapter {
|
||||
|
||||
// Send the message
|
||||
r.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
package de.butzlabben.world.wrapper;
|
||||
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class GeneratorSettingsTest {
|
||||
|
||||
@Test
|
||||
public void asWorldCreator() {
|
||||
GeneratorSettings settings = new GeneratorSettings();
|
||||
WorldCreator creator = settings.asWorldCreator("test");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user