Class BreakableCollectionTest

All Implemented Interfaces:
AddAllContract<Integer,BreakableCollection<Integer>>, AddContract<Integer,BreakableCollection<Integer>>, ClearContract<Integer,BreakableCollection<Integer>>, CollectionContract<Integer,BreakableCollection<Integer>>, ContainsAllContract<Integer,BreakableCollection<Integer>>, ContainsContract<Integer,BreakableCollection<Integer>>, IsEmptyContract<Integer,BreakableCollection<Integer>>, RemoveAllContract<Integer,BreakableCollection<Integer>>, RemoveContract<Integer,BreakableCollection<Integer>>, RemoveIfContract<Integer,BreakableCollection<Integer>>, RetainAllContract<Integer,BreakableCollection<Integer>>, SizeContract<Integer,BreakableCollection<Integer>>, StreamContract<Integer,BreakableCollection<Integer>>, ToArrayContract<Integer,BreakableCollection<Integer>>, CollectionContractConfig, ForEachContract<Integer,BreakableCollection<Integer>>, IterableContract<Integer,BreakableCollection<Integer>>, IteratorContract<Integer,BreakableCollection<Integer>>, SpliteratorContract<Integer,BreakableCollection<Integer>>, EqualsContract<BreakableCollection<Integer>>, HashCodeContract<BreakableCollection<Integer>>, ObjectContract<BreakableCollection<Integer>>, ToStringContract<BreakableCollection<Integer>>, CollectionContractSupport<Integer,BreakableCollection<Integer>>, CollectionProviderSupport<Integer,BreakableCollection<Integer>>, ContractSupport<BreakableCollection<Integer>>, ElementProviderSupport<Integer>, ProviderSupport<BreakableCollection<Integer>>, WithIntegerElement, SupportedMethods

public class BreakableCollectionTest extends AbstractTest implements CollectionContract<Integer,BreakableCollection<Integer>>, WithIntegerElement
Tests for the BreakableCollection 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

    • BreakableCollectionTest

      public BreakableCollectionTest()
  • Method Details

    • provider

      @NotNull public @NotNull CollectionProvider<Integer,BreakableCollection<Integer>> provider()
      Specified by:
      provider in interface CollectionProviderSupport<Integer,BreakableCollection<Integer>>
      Specified by:
      provider in interface ProviderSupport<BreakableCollection<Integer>>
    • testSizeWithSizeAlwaysReturnsZeroBreak

      @Test @DisplayName("Test the `size` method with the SIZE_ALWAYS_RETURNS_ZERO break") public void testSizeWithSizeAlwaysReturnsZeroBreak()
      Test that the SIZE_ALWAYS_RETURNS_ZERO break causes the size method to return zero.
      See Also:
    • testSizeWithSizeAlwaysReturnsConstantValueBreak

      @Test @DisplayName("Test the `size` method with the SIZE_ALWAYS_RETURNS_CONSTANT_VALUE break") public void testSizeWithSizeAlwaysReturnsConstantValueBreak()
      Test that the SIZE_ALWAYS_RETURNS_CONSTANT_VALUE break causes the size method to return a constant value.
      See Also:
    • testIsEmptyAlwaysReturnsTrueBreak

      @Test @DisplayName("Test the `size` method with the IS_EMPTY_ALWAYS_RETURNS_TRUE break") public void testIsEmptyAlwaysReturnsTrueBreak()
      Test that the IS_EMPTY_ALWAYS_RETURNS_TRUE break causes the isEmpty method to always return true.
      See Also:
    • testIsEmptyAlwaysReturnsFalseBreak

      @Test @DisplayName("Test the `size` method with the IS_EMPTY_ALWAYS_RETURNS_FALSE break") public void testIsEmptyAlwaysReturnsFalseBreak()
      Test that the IS_EMPTY_ALWAYS_RETURNS_FALSE break causes the isEmpty method to always return false.
      See Also:
    • testIsEmptyAlwaysReturnsOppositeValueBreak

      @Test @DisplayName("Test the `size` method with the IS_EMPTY_RETURNS_OPPOSITE_VALUE break") public void testIsEmptyAlwaysReturnsOppositeValueBreak()
      Test that the IS_EMPTY_RETURNS_OPPOSITE_VALUE break causes the isEmpty method to always return the opposite value.
      See Also:
    • testContainsAlwaysReturnsTrueBreak

      @Test @DisplayName("Test the `contains(Object)` method with the CONTAINS_ALWAYS_RETURNS_TRUE break") public void testContainsAlwaysReturnsTrueBreak()
      Test that the CONTAINS_ALWAYS_RETURNS_TRUE break causes the contains method to always return true.
      See Also:
    • testContainsAlwaysReturnsFalseBreak

      @Test @DisplayName("Test the `contains(Object)` method with the CONTAINS_ALWAYS_RETURNS_FALSE break") public void testContainsAlwaysReturnsFalseBreak()
      Test that the CONTAINS_ALWAYS_RETURNS_FALSE break causes the contains method to always return true.
      See Also:
    • testContainsAlwaysReturnsOppositeValueBreak

      @Test @DisplayName("Test the `contains(Object)` method with the CONTAINS_RETURNS_OPPOSITE_VALUE break") public void testContainsAlwaysReturnsOppositeValueBreak()
      Test that the CONTAINS_RETURNS_OPPOSITE_VALUE break causes the contains method to always return the opposite value.
      See Also:
    • testToArrayAlwaysReturnsNullBreak

      @Test @DisplayName("Test the `toArray()` method with the TO_ARRAY_RETURNS_NULL break") public void testToArrayAlwaysReturnsNullBreak()
      Test that the TO_ARRAY_RETURNS_NULL break causes the toArray() method to always return null.` value.
      See Also:
    • testToArrayAlwaysReturnsEmptyArrayBreak

      @Test @DisplayName("Test the `toArray()` method with the TO_ARRAY_RETURNS_EMPTY_ARRAY break") public void testToArrayAlwaysReturnsEmptyArrayBreak()
      Test that the TO_ARRAY_RETURNS_EMPTY_ARRAY break causes the toArray() method to always returns an empty array.
      See Also:
    • testToArrayMissingFirstElementBreak

      @Test @DisplayName("Test the `toArray()` method with the TO_ARRAY_MISSING_FIRST_ELEMENT break") public void testToArrayMissingFirstElementBreak()
      Test that the TO_ARRAY_MISSING_FIRST_ELEMENT break causes the toArray() method to return an array that is missing the first element.
      See Also:
    • testToArrayMissingLastElementBreak

      @Test @DisplayName("Test the `toArray()` method with the TO_ARRAY_MISSING_LAST_ELEMENT break") public void testToArrayMissingLastElementBreak()
      Test that the TO_ARRAY_MISSING_LAST_ELEMENT break causes the toArray() method to return an array that is missing the first element.
      See Also:
    • testToArrayStoreAlwaysReturnsNullBreak

      @Test @DisplayName("Test the `toArray(Object[])` method with the TO_ARRAY_STORE_RETURNS_NULL break") public void testToArrayStoreAlwaysReturnsNullBreak()
      Test that the TO_ARRAY_STORE_RETURNS_NULL break causes the toArray(Object[]) method to always return null.` value.
      See Also:
    • testToArrayStoreAlwaysReturnsEmptyArrayBreak

      @Test @DisplayName("Test the `toArray(Object[])` method with the TO_ARRAY_STORE_RETURNS_EMPTY_ARRAY break") public void testToArrayStoreAlwaysReturnsEmptyArrayBreak()
      Test that the TO_ARRAY_STORE_RETURNS_EMPTY_ARRAY break causes the toArray(Object[]) method to always returns an empty array.
      See Also:
    • testToArrayStoreMissingFirstElementBreak

      @Test @DisplayName("Test the `toArray(Object[])` method with the TO_ARRAY_STORE_MISSING_FIRST_ELEMENT break") public void testToArrayStoreMissingFirstElementBreak()
      Test that the TO_ARRAY_STORE_MISSING_FIRST_ELEMENT break causes the toArray() method to return an array that is missing the first element.
      See Also:
    • testToArrayStoreMissingLastElementBreak

      @Test @DisplayName("Test the `toArray(Object[])` method with the TO_ARRAY_STORE_MISSING_LAST_ELEMENT break") public void testToArrayStoreMissingLastElementBreak()
      Test that the TO_ARRAY_STORE_MISSING_LAST_ELEMENT break causes the toArray(Object[]) method to return an array that is missing the last element.
      See Also:
    • testToArrayStoreDoesNotCopyElementsBreak

      @Test @DisplayName("Test the `toArray(Object[])` method with the TO_ARRAY_STORE_DOES_NOT_COPY_ELEMENTS break") public void testToArrayStoreDoesNotCopyElementsBreak()
      Test that the TO_ARRAY_STORE_DOES_NOT_COPY_ELEMENTS break causes the toArray(Object[]) method to return an array that is missing the last element.
      See Also:
    • testAddDoesNotAddElementBreak

      @Test @DisplayName("test the `add()` method with the ADD_DOES_NOT_ADD_ELEMENT break") public void testAddDoesNotAddElementBreak()
      Test that the ADD_DOES_NOT_ADD_ELEMENT break causes the add(Object) method to not add the element.
      See Also:
    • testAddAlwaysReturnTrueBreak

      @Test @DisplayName("test the `add(Object)` method with the ADD_ALWAYS_RETURNS_TRUE break") public void testAddAlwaysReturnTrueBreak()
      Test that the ADD_ALWAYS_RETURNS_TRUE break causes the add(Object) method to always return true.
      See Also:
    • testAddAlwaysReturnFalseBreak

      @Test @DisplayName("test the `add(Object)` method with the ADD_ALWAYS_RETURNS_FALSE break") public void testAddAlwaysReturnFalseBreak()
      Test that the ADD_ALWAYS_RETURNS_FALSE break causes the add(Object) method to always return false.
      See Also:
    • testAddAlwaysReturnsOppositeValueBreak

      @Test @DisplayName("test the `add(Object)` method with the ADD_ALWAYS_RETURNS_OPPOSITE_VALUE break") public void testAddAlwaysReturnsOppositeValueBreak()
      Test that the ADD_ALWAYS_RETURNS_OPPOSITE_VALUE break causes the add(Object) method to always return the opposite value.
      See Also:
    • testRemoveDoesNotRemoveElementBreak

      @Test @DisplayName("test the `remove(Object)` method with the REMOVE_DOES_NOT_REMOVE_ELEMENT break") public void testRemoveDoesNotRemoveElementBreak()
      Test that the REMOVE_DOES_NOT_REMOVE_ELEMENT break causes the remove(Object) method to not remove the element.
      See Also:
    • testRemoveAlwaysReturnsTrueBreak

      @Test @DisplayName("test the `remove(Object)` method with the REMOVE_ALWAYS_RETURNS_TRUE break") public void testRemoveAlwaysReturnsTrueBreak()
      Test that the REMOVE_ALWAYS_RETURNS_TRUE break causes the remove(Object) method always returns true.
      See Also:
    • testRemoveAlwaysReturnsFalseBreak

      @Test @DisplayName("test the `remove(Object)` method with the REMOVE_ALWAYS_RETURNS_FALSE break") public void testRemoveAlwaysReturnsFalseBreak()
      Test that the REMOVE_ALWAYS_RETURNS_FALSE break causes the remove(Object) method always returns false.
      See Also:
    • testRemoveAlwaysReturnsOppositeValueBreak

      @Test @DisplayName("test the `remove(Object)` method with the REMOVE_ALWAYS_RETURNS_OPPOSITE_VALUE break") public void testRemoveAlwaysReturnsOppositeValueBreak()
      Test that the REMOVE_ALWAYS_RETURNS_OPPOSITE_VALUE break causes the remove(Object) method always returns false.
      See Also:
    • testContainsAllAlwaysReturnsTrueBreak

      @Test @DisplayName("Test the `containsAll(Collection)` method with the CONTAINS_ALL_ALWAYS_RETURNS_TRUE break") public void testContainsAllAlwaysReturnsTrueBreak()
      Test that the CONTAINS_ALL_ALWAYS_RETURNS_TRUE break causes the containsAll method to always return true.
      See Also:
    • testContainsAllAlwaysReturnsFalseBreak

      @Test @DisplayName("Test the `contains(Object)` method with the CONTAINS_ALL_ALWAYS_RETURNS_FALSE break") public void testContainsAllAlwaysReturnsFalseBreak()
      Test that the CONTAINS_ALL_ALWAYS_RETURNS_FALSE break causes the containsAll(Collection) method to always return true.
      See Also:
    • testContainsAllReturnsOppositeValueBreak

      @Test @DisplayName("Test the `containsAll(Collection)` method with the CONTAINS_ALL_ALWAYS_RETURNS_OPPOSITE_VALUE break") public void testContainsAllReturnsOppositeValueBreak()
      Test that the CONTAINS_ALL_ALWAYS_RETURNS_OPPOSITE_VALUE break causes the containsAll(Collection) method to always return the opposite value.
      See Also: