Class BreakableIteratorTest

java.lang.Object
org.soliscode.test.breakable.BreakableIteratorTest

@DisplayName("Tests for BreakableIterator") public class BreakableIteratorTest extends Object
Tests for the BreakableIterator class. These tests determine if the breaks supported by this class result in the behavior expected.
Since:
1.0
Author:
evanbergstrom
See Also:
  • Constructor Details

    • BreakableIteratorTest

      public BreakableIteratorTest()
  • Method Details

    • testIteratorWithAlwaysEmptyBreak

      @Test @DisplayName("Test the iterator with the ITERATOR_IS_ALWAYS_EMPTY break") public void testIteratorWithAlwaysEmptyBreak()
      Test that the ITERATOR_IS_ALWAYS_EMPTY break causes the iterator not iterate over any elements.
      See Also:
    • testIteratorWithSkipsFirstElementBreak

      @Test @DisplayName("Test the iterator with the ITERATOR_SKIPS_FIRST_ELEMENT break") public void testIteratorWithSkipsFirstElementBreak()
      Test that the ITERATOR_SKIPS_FIRST_ELEMENT break causes the iterator to skip over the first element.
      See Also:
    • testIteratorWithHasNextAlwaysReturnsTrue

      @Test @DisplayName("Test the `hasNext` method with the ITERATOR_HAS_NEXT_ALWAYS_RETURNS_TRUE break") public void testIteratorWithHasNextAlwaysReturnsTrue()
      Test that the ITERATOR_HAS_NEXT_ALWAYS_RETURNS_TRUE break causes the hasNext method to always return true.
      See Also:
    • testIteratorWithHasNextAlwaysReturnsFalseBreak

      @DisplayName("Test the `hasNext` method with the ITERATOR_HAS_NEXT_ALWAYS_RETURNS_FALSE break") @Test public void testIteratorWithHasNextAlwaysReturnsFalseBreak()
      Test that the ITERATOR_HAS_NEXT_ALWAYS_RETURNS_FALSE break causes the hasNext method to always return false.
      See Also:
    • testIteratorWithHasNextReturnsOppositeValueBreak

      @Test @DisplayName("Test the `hasNext` method with the ITERATOR_HAS_NEXT_RETURNS_OPPOSITE_VALUE break") public void testIteratorWithHasNextReturnsOppositeValueBreak()
      Test that the ITERATOR_HAS_NEXT_RETURNS_OPPOSITE_VALUE break causes the hasNext method to return the opposite value..
      See Also:
    • testIteratorWithNextAlwaysReturnsNullBreak

      @DisplayName("Test the `next` method with the ITERATOR_NEXT_ALWAYS_RETURNS_NULL break") @Test public void testIteratorWithNextAlwaysReturnsNullBreak()
      Test that the ITERATOR_NEXT_ALWAYS_RETURNS_NULL break causes the next method to always return null
      See Also:
    • testIteratorWithNextThrowsWrongExceptionBreak

      @Test @DisplayName("Test the `next` method with the ITERATOR_NEXT_THROWS_WRONG_EXCEPTION break") public void testIteratorWithNextThrowsWrongExceptionBreak()
      Test that the ITERATOR_NEXT_THROWS_WRONG_EXCEPTION break causes the next method to always return null
      See Also:
    • testIteratorWithRemoveDoesNotRemoveElementBreak

      @Test @DisplayName("Test the `remove` method with the ITERATOR_REMOVE_DOES_NOT_REMOVE_ELEMENT break") public void testIteratorWithRemoveDoesNotRemoveElementBreak()
      Test that the ITERATOR_REMOVE_DOES_NOT_REMOVE_ELEMENT break causes the remove method to not remove the element at the iterators current position.
      See Also:
    • testIteratorForEachRemainingWithDoesNotCallActionBreak

      @Test @DisplayName("Test the `forEachRemaining` method with the ITERATOR_FOR_EACH_REMAINING_DOES_NOT_CALL_ACTION break") public void testIteratorForEachRemainingWithDoesNotCallActionBreak()
      Test that the ITERATOR_FOR_EACH_REMAINING_DOES_NOT_CALL_ACTION break causes the forEachRemaining method to not call the action on any elements.
      See Also: