From 629b6bc7444005915983ae8d86c89c4ae215729e Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Tue, 26 Jul 2022 20:35:01 -0400 Subject: Restructure a bit --- src/test/java/bjc/esodata/ThresholdSetTest.java | 79 ------------------------- 1 file changed, 79 deletions(-) delete mode 100644 src/test/java/bjc/esodata/ThresholdSetTest.java (limited to 'src/test/java/bjc/esodata/ThresholdSetTest.java') 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 thst = TS("a", "b"); - - assertIteratorSet(false, thst.setView().iterator(), "a", "b"); - assertEquals(thst.setSize(), 2); - } - - @Test - public void testAddMulti() { - ThresholdSet thst = TS("a", "b", "a"); - - assertIteratorSet(false, thst.setView().iterator(), "b"); - assertEquals(thst.setSize(), 1); - } - - @Test - public void testAddMulti2() { - ThresholdSet thst = TS("a", "b"); - thst.add("a"); - - assertIteratorSet(false, thst.setView().iterator(), "b"); - assertEquals(thst.setSize(), 1); - } - - @Test - public void testContains() { - ThresholdSet 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 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 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"); - } -} -- cgit v1.2.3