org.aludratest.service.edifactfile
Class EdifactFileVerifier<E extends EdifactFileVerifier<E>>

java.lang.Object
  extended by org.aludratest.service.edifactfile.EdifactFileVerifier<E>
Type Parameters:
E -
All Implemented Interfaces:
ActionWordLibrary<E>

public class EdifactFileVerifier<E extends EdifactFileVerifier<E>>
extends Object
implements ActionWordLibrary<E>

Provides access to EDI files.

Author:
Volker Bergmann

Field Summary
static String ANY
           
static String DIFFERENT
           
static String MISSING
           
static String MOVED
           
static String UNEXPECTED
           
 
Constructor Summary
EdifactFileVerifier(String filePath, EdifactFileService service)
          Constructor.
 
Method Summary
 E addExclusionPath(StringData path)
          Adds an XPath expression of which all matching Edifact elements are ignored
 E addKeyExpression(KeyExpressionData keyExpression)
          Adds a key expression to the verifier.
 E addToleratedDiff(LocalDiffTypeData toleratedDiffType)
          Allows the given diff type in comparisons.
 E delete()
          Deletes the file.
 E verifyState()
          Verifies the state.
 E verifyWith(StringData referenceFileName)
          Asserts that the interchange stored in this document is equals to the provided interchange, ignoring the provided paths.
 E waitUntilExists()
          Polls the file system until a file at the given path is found or a timeout occurs.
 E waitUntilNotExists()
          Polls the file system until no file is found at the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final String ANY

DIFFERENT

public static final String DIFFERENT

MISSING

public static final String MISSING

MOVED

public static final String MOVED

UNEXPECTED

public static final String UNEXPECTED
Constructor Detail

EdifactFileVerifier

public EdifactFileVerifier(String filePath,
                           EdifactFileService service)
Constructor.

Parameters:
filePath -
service -
Method Detail

addExclusionPath

public E addExclusionPath(StringData path)
Adds an XPath expression of which all matching Edifact elements are ignored

Parameters:
path - an XPath expressions of the EDI elements to ignore in comparison
Returns:
a reference to the invoked EdifactFileVerifier instance

addToleratedDiff

public E addToleratedDiff(LocalDiffTypeData toleratedDiffType)
Allows the given diff type in comparisons.

Parameters:
toleratedDiffType - the diff type to tolerate
Returns:
a reference to the invoked EdifactFileVerifier instance

addKeyExpression

public E addKeyExpression(KeyExpressionData keyExpression)
Adds a key expression to the verifier. It is an XPath expression by which EdifactContent can determine the identity of an EDI element

Parameters:
keyExpression - the XPath expression that provides the id
Returns:
a reference to the invoked EdifactFileVerifier instance

delete

public E delete()
Deletes the file.

Returns:
a reference to the FileStream object itself

waitUntilExists

public E waitUntilExists()
Polls the file system until a file at the given path is found or a timeout occurs.

Returns:
a reference to the FileStream object itself

waitUntilNotExists

public E waitUntilNotExists()
Polls the file system until no file is found at the given path.

Returns:
a reference to the FileStream object itself

verifyWith

public E verifyWith(StringData referenceFileName)
Asserts that the interchange stored in this document is equals to the provided interchange, ignoring the provided paths.

Parameters:
referenceFileName - the name of the reference file to verify against
Returns:
a reference to the invoked EdifactFileVerifier instance

verifyState

public E verifyState()
Description copied from interface: ActionWordLibrary
Verifies the state. If the state is wrong, the implementor shall call an appropriate service method for reporting the inconsistency. GUIInteraction.wrongPageFlow(String)

Specified by:
verifyState in interface ActionWordLibrary<E extends EdifactFileVerifier<E>>
Returns:
a reference to itself (this).


Copyright © 2015 aludratest.org. All rights reserved.