diff options
| author | Ben Culkin <scorpress@gmail.com> | 2022-07-26 20:35:01 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2022-07-26 20:35:01 -0400 |
| commit | 629b6bc7444005915983ae8d86c89c4ae215729e (patch) | |
| tree | ef50616792bfa4392ff9541218ebeaeca62458f0 /src/test/java/bjc/esodata/ThresholdSetTest.java | |
| parent | 6ccd5d885084f983013584db35df60a22b76e521 (diff) | |
Restructure a bit
Diffstat (limited to 'src/test/java/bjc/esodata/ThresholdSetTest.java')
| -rw-r--r-- | src/test/java/bjc/esodata/ThresholdSetTest.java | 79 |
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"); - } -} |
