diff --git a/pom.xml b/pom.xml index ee65cc98b..38bd0fa57 100644 --- a/pom.xml +++ b/pom.xml @@ -27,11 +27,6 @@ everything http://repo.citizensnpcs.net/ - - - junit - http://mvnrepository.com/artifact/junit/ - @@ -56,20 +51,6 @@ jar provided - - junit - junit - 4.1 - jar - test - true - - - org.hamcrest - hamcrest-library - 1.2.1 - test - http://www.citizensnpcs.net diff --git a/src/net/citizensnpcs/test/ByIdArrayTest.java b/src/net/citizensnpcs/test/ByIdArrayTest.java deleted file mode 100644 index 824cfb03a..000000000 --- a/src/net/citizensnpcs/test/ByIdArrayTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.citizensnpcs.test; - -import java.util.Random; - -import net.citizensnpcs.util.ByIdArray; - -import org.junit.Test; - -public class ByIdArrayTest { - - @Test - public void testInsert() { - ByIdArray test = new ByIdArray(); - test.put(0, "one"); - assert (test.get(0).equals("one")); - assert (test.contains(0)); - assert (test.size() == 1); - test.remove(1000); // try illegal remove - test.clear(); - assert (test.size() == 0); - test.add("one"); - assert (test.get(0).equals("one")); - } - - @Test - public void testIteration() { - int iterations = 1000; - ByIdArray test = new ByIdArray(); - String[] values = new String[iterations]; - for (int i = 0; i < values.length; ++i) - values[i] = Integer.toString(i); - Random random = new Random(100); - int index = 0; - for (String value : values) - test.put((index += random.nextInt(10) + 1), value); - index = 0; - for (String value : test) - assert (value.equals(values[index++])); - } -} \ No newline at end of file diff --git a/src/net/citizensnpcs/test/CommandContextTest.java b/src/net/citizensnpcs/test/CommandContextTest.java deleted file mode 100644 index 36bc11021..000000000 --- a/src/net/citizensnpcs/test/CommandContextTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.citizensnpcs.test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.util.Arrays; -import java.util.List; -import java.util.Set; - -import net.citizensnpcs.command.CommandContext; - -import org.junit.Test; - -public class CommandContextTest { - @Test(expected = NumberFormatException.class) - public void testIllegalInteger() { - getContext("notInt").getInteger(0); - } - - @Test - public void testParsing() { - assertTrue(0.0 == getContext("0").getDouble(0)); - assertTrue(0 == getContext("0").getInteger(0)); - } - - @Test - public void testJoining() { - assertTrue(getContext("join strings").getJoinedStrings(0).equals("join strings")); - } - - @Test - public void testValueFlags() { - assertTrue(getContext("--test values").getFlag("test").equals("values")); - assertTrue(getContext("--t 0").getFlagInteger("t") == 0); - assertTrue(getContext("--test 'extended quotes' afterwards").getFlag("test").equals("extended quotes")); - assertFalse(getContext("--t").hasFlag('t')); - } - - @Test - public void testFlags() { - assertTrue(getContext("-f").getFlags().contains('f')); - Set multi = getContext("-f -mm test -ghl").getFlags(); - List shouldContain = Arrays.asList('f', 'm', 'g', 'h', 'l'); - assertTrue(multi.containsAll(shouldContain)); - } - - @Test - public void testQuotes() { - assertTrue(getContext("'this is a quote'").getString(0).equals("this is a quote")); - assertTrue(getContext("'this is unclosed\"").getString(0).equals("'this")); - assertTrue(getContext("\"test double quotes\"").getString(0).equals("test double quotes")); - assertTrue(getContext("'this is a quote'").getString(0).equals("this is a quote")); - } - - private static CommandContext getContext(String cmd) { - return new CommandContext("dummy " + cmd); - } -} \ No newline at end of file diff --git a/src/net/citizensnpcs/test/StorageTest.java b/src/net/citizensnpcs/test/StorageTest.java deleted file mode 100644 index 2b72f3401..000000000 --- a/src/net/citizensnpcs/test/StorageTest.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.citizensnpcs.test; - -import org.junit.Test; - -public class StorageTest { - - @Test - public void testYaml() { - } -} \ No newline at end of file