Class ShouldContainEntry

java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldContainEntry
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldContainEntry extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies a map contains an entry..
  • Method Details

    • shouldContainEntry

      public static <K, V> ErrorMessageFactory shouldContainEntry(Map<K,V> actual, Condition<?> entryCondition)
      Creates a new ShouldContainEntry.
      Type Parameters:
      K - key type
      V - value type
      Parameters:
      actual - the actual map in the failed assertion.
      entryCondition - entry condition.
      Returns:
      the created ErrorMessageFactory.
    • shouldContainEntry

      public static <K, V> ErrorMessageFactory shouldContainEntry(Map<K,V> actual, Condition<? super K> keyCondition, Condition<? super V> valueCondition)
      Creates a new ShouldContainEntry.
      Type Parameters:
      K - key type
      V - value type
      Parameters:
      actual - the actual map in the failed assertion.
      keyCondition - key condition.
      valueCondition - value condition.
      Returns:
      the created ErrorMessageFactory.