From 843329de434bb334d90927c4d22345373a388530 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Tue, 2 Jul 2019 18:05:22 -0400 Subject: Rename package root The package root is now bjc, not io.github.bculkin2442. --- .../bculkin2442/esodata/ThresholdSetTest.java | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/test/java/io/github/bculkin2442/esodata/ThresholdSetTest.java (limited to 'src/test/java/io/github/bculkin2442/esodata/ThresholdSetTest.java') 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 thst = new ThresholdSet<>(); + + thst.addAll("a", "b"); + + assertIteratorEquals(false, thst.setView().iterator(), "a", "b"); + } + + @Test + public void testAddMulti() { + ThresholdSet thst = new ThresholdSet<>(); + + thst.addAll("a", "b", "a"); + + assertIteratorEquals(false, thst.setView().iterator(), "b"); + } + + @Test + public void testRemoveMulti() { + ThresholdSet thst = new ThresholdSet<>(); + + thst.addAll("a", "a", "b"); + thst.removeAll("a"); + + assertIteratorEquals(false, thst.setView().iterator(), "a", "b"); + } +} -- cgit v1.2.3