Class SortedMapInterfaceTest<K,​V>

  • All Implemented Interfaces:
    junit.framework.Test

    @GwtCompatible
    public abstract class SortedMapInterfaceTest<K,​V>
    extends MapInterfaceTest<K,​V>
    Tests representing the contract of SortedMap. Concrete subclasses of this base class test conformance of concrete SortedMap subclasses to that contract.
    Author:
    Jared Levy
    • Constructor Detail

      • SortedMapInterfaceTest

        protected SortedMapInterfaceTest​(boolean allowsNullKeys,
                                         boolean allowsNullValues,
                                         boolean supportsPut,
                                         boolean supportsRemove,
                                         boolean supportsClear)
    • Method Detail

      • makeEmptyMap

        protected abstract java.util.SortedMap<K,​VmakeEmptyMap()
                                                                throws java.lang.UnsupportedOperationException
        Description copied from class: MapInterfaceTest
        Creates a new, empty instance of the class under test.
        Specified by:
        makeEmptyMap in class MapInterfaceTest<K,​V>
        Returns:
        a new, empty map instance.
        Throws:
        java.lang.UnsupportedOperationException - if it's not possible to make an empty instance of the class under test.
      • makePopulatedMap

        protected abstract java.util.SortedMap<K,​VmakePopulatedMap()
                                                                    throws java.lang.UnsupportedOperationException
        Description copied from class: MapInterfaceTest
        Creates a new, non-empty instance of the class under test.
        Specified by:
        makePopulatedMap in class MapInterfaceTest<K,​V>
        Returns:
        a new, non-empty map instance.
        Throws:
        java.lang.UnsupportedOperationException - if it's not possible to make a non-empty instance of the class under test.