Class Description

  • All Implemented Interfaces:
    VerificationMode

    public class Description
    extends java.lang.Object
    implements VerificationMode
    Description verification mode wraps an existing verification mode and prepends a custom message to the assertion error if verification fails.
    Since:
    2.1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      Description​(VerificationMode verification, java.lang.String description)
      Constructs a verification mode which wraps the given verification mode.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void verify​(VerificationData data)
      Performs verification using the wrapped verification mode implementation.
      • Methods inherited from class java.lang.Object

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

      • description

        private final java.lang.String description
    • Constructor Detail

      • Description

        public Description​(VerificationMode verification,
                           java.lang.String description)
        Constructs a verification mode which wraps the given verification mode.
        Parameters:
        verification - The implementation to use for verification
        description - The failure message to prepend if verification fails
    • Method Detail

      • verify

        public void verify​(VerificationData data)
        Performs verification using the wrapped verification mode implementation. Prepends the custom failure message if verification fails.
        Specified by:
        verify in interface VerificationMode
        Parameters:
        data - the data to be verified