Class StringVerifier

java.lang.Object
org.japprove.verifier.Verifier
org.japprove.verifier.StringVerifier

public class StringVerifier
extends Verifier
The StringVerifier provides methods to verify String objects or String lists within Approval Tests.
  • Constructor Summary

    Constructors 
    Constructor Description
    StringVerifier​(ApprovalTestingEngine approvalTestingEngine)  
  • Method Summary

    Modifier and Type Method Description
    void verify​(java.lang.String data)
    Receives a String that should be verified within an Approval Test.
    void verify​(java.util.List<java.lang.String> data)
    Receives a List of Strings that should be verified within an Approval Test.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • verify

      public void verify​(java.lang.String data)
      Receives a String that should be verified within an Approval Test.

      Within the verification process, the passed data is compared to the data in the corresponding baseline. In the case the versions are equal, the test passes. If no baseline exists, a VersionNotApprovedError is thrown. If there is a baseline that is not equal to the current version, a VerificationFailedError is thrown.

      Parameters:
      data - The String that should be verified
    • verify

      public void verify​(java.util.List<java.lang.String> data)
      Receives a List of Strings that should be verified within an Approval Test.

      Within the verification process, the passed data is compared to the data in the corresponding baseline. In the case the versions are equal, the test passes. If no baseline exists, a VersionNotApprovedError is thrown. If there is a baseline that is not equal to the current version, a VerificationFailedError is thrown.

      Parameters:
      data - The String that should be verified