diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-07-02 18:32:37 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-07-02 18:32:37 -0400 |
| commit | 4d0a59a0023f2b4fca144a089a3f75acb4ebd62b (patch) | |
| tree | eed89369ceda7dd1b356dd5055ada9287738b092 /src/test/java/bjc/esodata | |
| parent | 3a56e3ee3f2f6069de5cf8d2bee81052bbf346e6 (diff) | |
Move tests to new package
Diffstat (limited to 'src/test/java/bjc/esodata')
| -rw-r--r-- | src/test/java/bjc/esodata/ThresholdSetTest.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/test/java/bjc/esodata/ThresholdSetTest.java b/src/test/java/bjc/esodata/ThresholdSetTest.java new file mode 100644 index 0000000..b37f866 --- /dev/null +++ b/src/test/java/bjc/esodata/ThresholdSetTest.java @@ -0,0 +1,46 @@ +package bjc.esodata; + +import org.junit.Test; + +import bjc.TestUtils; +import bjc.esodata.ThresholdSet; + +import java.util.Iterator; + +import static bjc.TestUtils.*; +import static org.junit.Assert.*; + +/** + * Tests for ThresholdSet + * + * @author Ben Culkin. + */ +public class ThresholdSetTest { + @Test + public void testAdd() { + ThresholdSet<String> thst = new ThresholdSet<>(); + + thst.addKeys("a", "b"); + + assertIteratorEquals(false, thst.setView().iterator(), "a", "b"); + } + + @Test + public void testAddMulti() { + ThresholdSet<String> thst = new ThresholdSet<>(); + + thst.addKeys("a", "b", "a"); + + assertIteratorEquals(false, thst.setView().iterator(), "b"); + } + + @Test + public void testRemoveMulti() { + ThresholdSet<String> thst = new ThresholdSet<>(); + + thst.addKeys("a", "a", "b"); + thst.removeKeys("a"); + + assertIteratorEquals(false, thst.setView().iterator(), "a", "b"); + } +} |
