Makes the jar building finally work
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good

This commit is contained in:
2021-08-02 11:38:43 +02:00
parent 123a8eddda
commit 51ceac69da
2 changed files with 26 additions and 33 deletions

View File

@ -1,7 +1,6 @@
package net.knarcraft.minecraftserverlauncher.utility;
import net.knarcraft.minecraftserverlauncher.Main;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
@ -34,13 +33,21 @@ public class JarBuilderTest {
@Test
@Order(3)
public void buildLatestSpigotJarTest() {
File spigotFile = new File(jarDirectory + "SpigotLatest.jar");
if (spigotFile.exists() && !spigotFile.delete()) {
throw new IllegalArgumentException("Unable to remove existing spigot .jar");
}
jarBuilder.buildSpigotJar();
assertTrue(new File(jarDirectory + "SpigotLatest.jar").exists());
assertTrue(spigotFile.exists());
}
@Test
@Order(4)
public void buildLatestBukkitJarTest() {
File bukkitFile = new File(jarDirectory + "BukkitLatest.jar");
if (bukkitFile.exists() && !bukkitFile.delete()) {
throw new IllegalArgumentException("Unable to remove existing bukkit .jar");
}
jarBuilder.buildBukkitJar();
assertTrue(new File(jarDirectory + "BukkitLatest.jar").exists());
}