Interface ContainsExtraTypeInfo

  • All Known Implementing Classes:
    ArrayEquals, Equals

    public interface ContainsExtraTypeInfo
    Intended to use in certain ArgumentMatchers. When ArgumentMatcher fails, chance is that the actual object has the same output of toString() than the wanted object. This looks weird when failures are reported. Therefore when matcher fails but toString() yields the same outputs, we will try to use the toStringWithType() method.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String toStringWithType()
      Returns more verbose description of the object which include type information
      boolean typeMatches​(java.lang.Object target)
      Checks if target target has matching type.
    • Method Detail

      • toStringWithType

        java.lang.String toStringWithType()
        Returns more verbose description of the object which include type information
      • typeMatches

        boolean typeMatches​(java.lang.Object target)
        Checks if target target has matching type. If the type matches, there is no point in rendering result from toStringWithType()