summaryrefslogtreecommitdiff
path: root/src/test/java/bjc/data/CircularIteratorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/bjc/data/CircularIteratorTest.java')
-rw-r--r--src/test/java/bjc/data/CircularIteratorTest.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/test/java/bjc/data/CircularIteratorTest.java b/src/test/java/bjc/data/CircularIteratorTest.java
deleted file mode 100644
index 8091e1c..0000000
--- a/src/test/java/bjc/data/CircularIteratorTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package bjc.data;
-
-import static bjc.TestUtils.*;
-import java.util.*;
-
-import org.junit.Test;
-
-/**
- * Test for circular iterators.,
- *
- * @author bjculkin
- *
- */
-public class CircularIteratorTest {
- /**
- * Test regular repetition of the entire iterator.
- */
- @Test
- public void testRegular() {
- List<String> lst = Arrays.asList("a", "b", "c");
-
- CircularIterator<String> itr = new CircularIterator<>(lst);
-
- // Check we get initial values correctly, and have more remaining
- assertIteratorEquals(true, itr, "a", "b", "c");
-
- // Check we repeat correctly, and can still repeat
- assertIteratorEquals(true, itr, "a", "b", "c");
- }
-
- /**
- * Test that the last element repeats correctly.
- */
- @Test
- public void testRepLast() {
- List<String> lst = Arrays.asList("a", "b", "c");
-
- CircularIterator<String> itr = new CircularIterator<>(lst, false);
-
- // Check we get initial values correctly, and have more remaining
- assertIteratorEquals(true, itr, "a", "b", "c");
-
- // Check we repeat correctly, and can still repeat
- assertIteratorEquals(true, itr, "c", "c", "c");
- }
-
- /**
- * Test that remove throws an exception.
- */
- @Test(expected = UnsupportedOperationException.class)
- public void testRemove() {
- Iterator<String> arrayItr = new ArrayIterator<>("a", "b");
- CircularIterator<String> itr = new CircularIterator<>(() -> arrayItr);
-
- itr.remove();
- }
-}