Class MapSubject<S extends MapSubject<S,​K,​V,​M>,​K,​V,​M extends java.util.Map<K,​V>>


  • public class MapSubject<S extends MapSubject<S,​K,​V,​M>,​K,​V,​M extends java.util.Map<K,​V>>
    extends Subject<S,​M>
    Propositions for Map subjects.
    • Constructor Detail

    • Method Detail

      • create

        static <K,​V,​M extends java.util.Map<K,​V>> MapSubject<? extends MapSubject<?,​K,​V,​M>,​K,​V,​M> create​(FailureStrategy failureStrategy,
                                                                                                                                                               java.util.Map<K,​V> map)
      • isEmpty

        public void isEmpty()
        Fails if the map is not empty.
      • isNotEmpty

        public void isNotEmpty()
        Fails if the map is empty.
      • hasSize

        public final void hasSize​(int expectedSize)
        Fails if the map does not have the given size.
      • containsKey

        public void containsKey​(java.lang.Object key)
        Fails if the map does not contain the given key.
      • doesNotContainKey

        public void doesNotContainKey​(java.lang.Object key)
        Fails if the map contains the given key.
      • containsEntry

        public void containsEntry​(java.lang.Object key,
                                  java.lang.Object value)
        Fails if the map does not contain the given entry.
      • doesNotContainEntry

        public void doesNotContainEntry​(java.lang.Object key,
                                        java.lang.Object value)
        Fails if the map contains the given entry.
      • lacksKey

        @Deprecated
        public void lacksKey​(K key)
        Deprecated.
        Fails if the map contains the given key.