mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-17 14:19:41 -05:00
Fix update checking issue, add unitTest
Former-commit-id: d7a3c5b8815b77dac4708cd8a049b9653092e8e2
This commit is contained in:
1 parent
daf1106eab
commit
46f34f31f9
2 files changed
+46
-16
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package util;
|
||||
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.maxgamer.quickshop.util.Updater;
|
||||
|
||||
public class UpdaterTest {
|
||||
|
||||
@Test
|
||||
public void TestUpdateVer() {
|
||||
Assert.assertTrue(Updater.hasUpdate("3", "4"));
|
||||
Assert.assertFalse(Updater.hasUpdate("3.2.3", "3.2.3"));
|
||||
Assert.assertTrue(Updater.hasUpdate("3.2.0", "3.2.3"));
|
||||
Assert.assertTrue(Updater.hasUpdate("3.2.3", "3.2.3.1"));
|
||||
Assert.assertTrue(Updater.hasUpdate("3.2.3", "3.2.3.0"));
|
||||
Assert.assertTrue(Updater.hasUpdate("3.2.3.0", "3.2.3.1"));
|
||||
Assert.assertFalse(Updater.hasUpdate("3.2.3.1.3", "3.2.3.1"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user