package net.knarcraft.minecraftserverlauncher.utility; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; public class UpdaterTest { @Test public void isVersionHigherTest() { assertTrue(Updater.isVersionHigher("1.1.1", "1.1.2")); assertFalse(Updater.isVersionHigher("1.1.1", "1.1.1")); assertFalse(Updater.isVersionHigher("1.1.1", "1.1.0")); assertTrue(Updater.isVersionHigher("1.1.1", "1.2.1")); assertFalse(Updater.isVersionHigher("1.2.1", "1.1.6")); assertTrue(Updater.isVersionHigher("1.2.1", "2.1.6")); assertTrue(Updater.isVersionHigher("1.2.1", "2.0.0")); assertTrue(Updater.isVersionHigher("1.2", "1.2.1")); assertTrue(Updater.isVersionHigher("1.1.2", "1.2")); } }