Class UnambiguousRepresentation


  • public class UnambiguousRepresentation
    extends java.lang.Object
    Utility class around Representation to provide the toStringOf representations of actual and expected when they are different, and their unambiguousToStringOf representations if not.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String actual  
      private java.lang.String expected  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getActual()
      Provide a representation of actual guaranteed to be different from getExpected().
      java.lang.String getExpected()
      Provide a representation of expected guaranteed to be different from getActual().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • actual

        private final java.lang.String actual
      • expected

        private final java.lang.String expected
    • Constructor Detail

      • UnambiguousRepresentation

        public UnambiguousRepresentation​(Representation representation,
                                         java.lang.Object actual,
                                         java.lang.Object expected)
    • Method Detail

      • getActual

        public java.lang.String getActual()
        Provide a representation of actual guaranteed to be different from getExpected().
        Returns:
        a suitable representation of the actual object given at construction time.
      • getExpected

        public java.lang.String getExpected()
        Provide a representation of expected guaranteed to be different from getActual().
        Returns:
        a suitable representation of the expected object given at construction time.