|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.util.ParseTester
public class ParseTester
Tests correctness of message parsing by testing equivalence of re-encoded form with original.
Nested Class Summary | |
---|---|
static class |
ParseTester.CommentFilterReader
Removes C and C++ style comments from a reader stream. |
Constructor Summary | |
---|---|
ParseTester()
Creates a new instance of ParseTester |
Method Summary | |
---|---|
java.lang.String |
getNextMessage()
Retrieves the next message (setSource() must be called first). |
static void |
main(java.lang.String[] args)
Command line tool for testing messages in files. |
static HL7Exception |
parsesCorrectly(java.lang.String context,
java.lang.String message)
Checks whether the given message parses correctly with a GenericParser. |
void |
setContext(java.lang.String description)
Sets a description of the context of the messages (e.g. |
void |
setSource(java.io.Reader source)
Sets the source of message data (messages must be delimited by blank lines) |
HL7Exception[] |
testAll()
Tests all remaining messages available from the currrent source. |
HL7Exception[] |
testAll(java.io.File source)
Sets the source reader to point to the given file, and tests all the messages therein (if a directory, processes all contained files recursively). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParseTester()
Method Detail |
---|
public static HL7Exception parsesCorrectly(java.lang.String context, java.lang.String message)
message
- an XML or ER7 encoded message string
public void setSource(java.io.Reader source)
public void setContext(java.lang.String description)
public HL7Exception[] testAll(java.io.File source) throws java.io.IOException
java.io.IOException
public HL7Exception[] testAll() throws java.io.IOException
java.io.IOException
public java.lang.String getNextMessage() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |