autohit.verify
Interface Verify

All Known Implementing Classes:
TestVerify, HTTPVerify

public abstract interface Verify

An interface to a standard verification facillity.

this may seem like an unneccessary layer of abstraction, but I have plans for the future...


Field Summary
static java.lang.String psVE_NO_CONTEXT
          Test for exceptions.
 
Method Summary
 boolean crc(int expected)
          A CRC check operation.
 boolean exec(java.lang.String invocation, java.lang.String content)
          Run a sub-executable to perform a verification.
 void fresh(Response context)
          Create a fresh verification context.
 int lastDelta()
          Returns the numeric difference from the previous operation.
 void reset()
          Reset the current verification context.
 boolean seek(java.lang.String expected)
          A seek operation.
 boolean size(int expected)
          A size check operation.
 

Field Detail

psVE_NO_CONTEXT

public static final java.lang.String psVE_NO_CONTEXT
Test for exceptions. Prolly not the best place to put this...
Method Detail

fresh

public void fresh(Response context)
           throws VerifyException
Create a fresh verification context.
Parameters:
address - Address specification.
Throws:
autohit.transport.VerifyException -  

reset

public void reset()
           throws VerifyException
Reset the current verification context.
Parameters:
address - Address specification.
Throws:
autohit.transport.VerifyException -  

seek

public boolean seek(java.lang.String expected)
             throws VerifyException
A seek operation.
Parameters:
expected - the string to seek.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -  

crc

public boolean crc(int expected)
            throws VerifyException
A CRC check operation.
Parameters:
expected - the expected CRC value.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -  

size

public boolean size(int expected)
             throws VerifyException
A size check operation.
Parameters:
expected - the expected size.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -  

lastDelta

public int lastDelta()
              throws VerifyException
Returns the numeric difference from the previous operation. Currently, if will return the diff between the expected and actual values calculated in crc and size.

It is calculated as actual - expected.

Returns:
numeric delta. It will be 0, if there was no difference.
Throws:
autohit.transport.VerifyException -  

exec

public boolean exec(java.lang.String invocation,
                    java.lang.String content)
             throws VerifyException
Run a sub-executable to perform a verification.
Parameters:
invocation - an invocation string. used by the specific verification to determine what to run and how to run it.
content - passed to the sun-executable as content.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -