Class AbstractCollectionTester<E>

    • Field Detail

      • collection

        protected java.util.Collection<E> collection
    • Constructor Detail

      • AbstractCollectionTester

        public AbstractCollectionTester()
    • Method Detail

      • resetContainer

        protected java.util.Collection<E> resetContainer​(java.util.Collection<E> newContents)
        Description copied from class: AbstractContainerTester
        Replaces the existing container under test with a new container. This is useful when a single test method needs to create multiple containers while retaining the ability to use expectContents(E...) and other convenience methods. The creation of multiple containers in a single method is discouraged in most cases, but it is vital to the iterator tests.
        Overrides:
        resetContainer in class AbstractContainerTester<java.util.Collection<E>,​E>
        Parameters:
        newContents - the new container instance
        Returns:
        the new container instance
      • createArrayWithNullElement

        protected E[] createArrayWithNullElement()
        Returns:
        an array of the proper size with null inserted into the middle element.
      • initCollectionWithNullElement

        protected void initCollectionWithNullElement()
      • expectNullMissingWhenNullUnsupported

        protected void expectNullMissingWhenNullUnsupported​(java.lang.String message)
        Equivalent to expectMissing(null) except that the call to contains(null) is permitted to throw a NullPointerException.
        Parameters:
        message - message to use upon assertion failure