All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
Drops the idea of using serializable Adds a new controller object which takes care of profiles and saving Moves profile independent settings to its own file Makes saving and loading from file a lot cleaner Fixes the bug preventing lastly used profile from loading Makes the profile object only do profile things Moves gui initialization to the controller object Updates vanilla version from 1.16.1 to 1.16.2 Moves backup to common functions
24 lines
721 B
Java
24 lines
721 B
Java
package net.knarcraft.minecraftserverlauncher.server;
|
|
|
|
import org.junit.Test;
|
|
|
|
import javax.naming.ConfigurationException;
|
|
|
|
import static junit.framework.TestCase.assertEquals;
|
|
import static junit.framework.TestCase.assertFalse;
|
|
|
|
public class ServerTest {
|
|
|
|
@Test
|
|
public void fromStringTest() throws ConfigurationException {
|
|
Server server = Server.fromString("asd;/home/;false;Bukkit;1.10.2;4G;");
|
|
assertEquals("asd", server.getName());
|
|
assertEquals("/home/", server.getPath());
|
|
assertFalse(server.isEnabled());
|
|
assertEquals("Bukkit", server.getTypeName());
|
|
assertEquals("1.10.2", server.getServerVersion());
|
|
assertEquals("4G", server.getMaxRam());
|
|
}
|
|
|
|
}
|