summaryrefslogtreecommitdiff
path: root/src/test/java/io/github/bculkin2442/esodata
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2019-07-02 18:05:22 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2019-07-02 18:05:22 -0400
commit843329de434bb334d90927c4d22345373a388530 (patch)
treeb0ad1f764bd29ff43841e1095a5b58194c20cb37 /src/test/java/io/github/bculkin2442/esodata
parentac36f171a3cebb0993cc28548635e3f654f8e325 (diff)
Rename package root
The package root is now bjc, not io.github.bculkin2442.
Diffstat (limited to 'src/test/java/io/github/bculkin2442/esodata')
-rw-r--r--src/test/java/io/github/bculkin2442/esodata/ThresholdSetTest.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/test/java/io/github/bculkin2442/esodata/ThresholdSetTest.java b/src/test/java/io/github/bculkin2442/esodata/ThresholdSetTest.java
new file mode 100644
index 0000000..c8f2bd3
--- /dev/null
+++ b/src/test/java/io/github/bculkin2442/esodata/ThresholdSetTest.java
@@ -0,0 +1,46 @@
+package io.github.bculkin2442.esodata;
+
+import org.junit.Test;
+
+import bjc.esodata.ThresholdSet;
+import io.github.bculkin2442.TestUtils;
+
+import java.util.Iterator;
+
+import static org.junit.Assert.*;
+import static io.github.bculkin2442.TestUtils.*;
+
+/**
+ * Tests for ThresholdSet
+ *
+ * @author Ben Culkin.
+ */
+public class ThresholdSetTest {
+ @Test
+ public void testAdd() {
+ ThresholdSet<String> thst = new ThresholdSet<>();
+
+ thst.addAll("a", "b");
+
+ assertIteratorEquals(false, thst.setView().iterator(), "a", "b");
+ }
+
+ @Test
+ public void testAddMulti() {
+ ThresholdSet<String> thst = new ThresholdSet<>();
+
+ thst.addAll("a", "b", "a");
+
+ assertIteratorEquals(false, thst.setView().iterator(), "b");
+ }
+
+ @Test
+ public void testRemoveMulti() {
+ ThresholdSet<String> thst = new ThresholdSet<>();
+
+ thst.addAll("a", "a", "b");
+ thst.removeAll("a");
+
+ assertIteratorEquals(false, thst.setView().iterator(), "a", "b");
+ }
+}