Reporter

public interface Reporter

Created by nikolavp on 1/30/14.

Methods

approveNew

void approveNew(byte[] value, File fileForApproval, File fileForVerification)

Called by an com.nikolavp.approval.Approval object when a value for verification is produced but no old.

Parameters:
  • value – the new value that came from the verification
  • fileForApproval – the approval file(this contains the value that was passed in)
  • fileForVerification – the file for the this new approval value @return true if the new value is approved and false otherwise

canApprove

boolean canApprove(File fileForApproval)

A method to check if this reporter is supported for the following file type or environment! Reporters are different for different platforms and file types and this in conjuction with com.nikolavp.approval.reporters.Reporters.firstWorking will allow you to plug different reporters for different environments(CI, Windows, Linux, MacOS, etc).

Parameters:
  • fileForApproval – the file that we want to approve
Returns:

true if we can approve the file and false otherwise

notTheSame

void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval)

Called by an com.nikolavp.approval.Approval object when values don’t match in the approval process.

Parameters:
  • oldValue – the old value that was found in fileForVerification from old runs
  • newValue – the new value that was passed for verification
  • fileForVerification – the file for this approval value
  • fileForApproval – the file for the new content