mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Would this classify as a test case?
This commit is contained in:
parent
9fcab4ba87
commit
b47231ca8c
@ -90,5 +90,10 @@
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/plotme-0.13f.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.11</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
17
PlotSquared/src/main/java/PlotTesting/Test1.java
Normal file
17
PlotSquared/src/main/java/PlotTesting/Test1.java
Normal file
@ -0,0 +1,17 @@
|
||||
package PlotTesting;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotHelper;
|
||||
import com.intellectualcrafters.plot.PlotMain;
|
||||
|
||||
public class Test1 {
|
||||
|
||||
// I have no idea what I should actually test :p
|
||||
|
||||
@Test
|
||||
public void testSquare() {
|
||||
Assert.assertEquals(PlotHelper.square(5), 25);
|
||||
}
|
||||
}
|
@ -697,7 +697,14 @@ public class PlotMain extends JavaPlugin {
|
||||
}
|
||||
if (getServer().getPluginManager().getPlugin("WorldEdit") != null) {
|
||||
worldEdit = (WorldEditPlugin) getServer().getPluginManager().getPlugin("WorldEdit");
|
||||
getServer().getPluginManager().registerEvents(new WorldEditListener(), this);
|
||||
|
||||
String version = worldEdit.getDescription().getVersion();
|
||||
if (version!=null && version.startsWith("5")) {
|
||||
PlotMain.sendConsoleSenderMessage("&cPlease update to WorldEdit 6 for improved stability and additional features:\nhttp://builds.enginehub.org/job/worldedit");
|
||||
}
|
||||
else {
|
||||
getServer().getPluginManager().registerEvents(new WorldEditListener(), this);
|
||||
}
|
||||
}
|
||||
if (Settings.WORLDGUARD) {
|
||||
if (getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user