summaryrefslogtreecommitdiff
path: root/src/test/java/bjc/esodata/ThresholdSetTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/bjc/esodata/ThresholdSetTest.java')
-rw-r--r--src/test/java/bjc/esodata/ThresholdSetTest.java79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/test/java/bjc/esodata/ThresholdSetTest.java b/src/test/java/bjc/esodata/ThresholdSetTest.java
deleted file mode 100644
index c9403da..0000000
--- a/src/test/java/bjc/esodata/ThresholdSetTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package bjc.esodata;
-
-import org.junit.Test;
-
-import static bjc.TestUtils.*;
-
-import static bjc.esodata.ThresholdSet.*;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests for ThresholdSet
- *
- * @author Ben Culkin.
- */
-@SuppressWarnings("javadoc")
-public class ThresholdSetTest {
- @Test
- public void testAdd() {
- ThresholdSet<String> thst = TS("a", "b");
-
- assertIteratorSet(false, thst.setView().iterator(), "a", "b");
- assertEquals(thst.setSize(), 2);
- }
-
- @Test
- public void testAddMulti() {
- ThresholdSet<String> thst = TS("a", "b", "a");
-
- assertIteratorSet(false, thst.setView().iterator(), "b");
- assertEquals(thst.setSize(), 1);
- }
-
- @Test
- public void testAddMulti2() {
- ThresholdSet<String> thst = TS("a", "b");
- thst.add("a");
-
- assertIteratorSet(false, thst.setView().iterator(), "b");
- assertEquals(thst.setSize(), 1);
- }
-
- @Test
- public void testContains() {
- ThresholdSet<String> thst = TS("1", "2", "2", "x", "z");
-
- int[] exps = new int[] {
- 1, 2, -1
- };
- assertArrayEquals(exps, thst.containsKeys("1", "2", "y"));
- }
-
- @Test
- public void testRemoveMulti() {
- ThresholdSet<String> thst = TS("a", "a", "b");
-
- thst.remove("a");
-
- assertIteratorSet(false, thst.setView().iterator(), "a", "b");
- assertEquals(2, thst.setSize());
-
- thst.remove("a");
-
- assertIteratorSet(false, thst.setView().iterator(), "b");
- assertEquals(1, thst.setSize());
- }
-
- @Test
- public void testSetTransparency() {
- ThresholdSet<String> thst = TS("a", "b", "c");
-
- thst.setView().add("b");
- assertIteratorSet(false, thst.setView().iterator(), "a", "c");
- assertEquals(2, thst.setView().size());
-
- thst.setView().remove("c");
- assertIteratorSet(false, thst.setView().iterator(), "a");
- }
-}