From 373464d30d87bd8702fe27b920ed1406a0833ef3 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Fri, 27 Mar 2020 16:39:52 -0400 Subject: Refactor test structure Tests are now in a 'test' sub-package, so it is clear that they are indeed test code, not just disjoint parts of the main code --- .../java/bjc/utils/data/CircularIteratorTest.java | 49 ---------------------- 1 file changed, 49 deletions(-) delete mode 100644 base/src/test/java/bjc/utils/data/CircularIteratorTest.java (limited to 'base/src/test/java/bjc/utils/data/CircularIteratorTest.java') diff --git a/base/src/test/java/bjc/utils/data/CircularIteratorTest.java b/base/src/test/java/bjc/utils/data/CircularIteratorTest.java deleted file mode 100644 index 5e20a17..0000000 --- a/base/src/test/java/bjc/utils/data/CircularIteratorTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package bjc.utils.data; - -import static bjc.utils.funcutils.TestUtils.assertIteratorEquals; - -import java.util.Arrays; -import java.util.List; - -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 lst = Arrays.asList("a", "b", "c"); - - CircularIterator 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 lst = Arrays.asList("a", "b", "c"); - - CircularIterator 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"); - } -} -- cgit v1.2.3