org.milyn.edi.test
Class EdifactDirTestHarness

java.lang.Object
  extended by org.milyn.edi.test.EdifactDirTestHarness
All Implemented Interfaces:
UNEdifactInterchangeFactory

public class EdifactDirTestHarness
extends java.lang.Object
implements UNEdifactInterchangeFactory

EDIFACT Directory (.zip Specification file) test harness.

Author:
tom.fennelly@gmail.com

Constructor Summary
EdifactDirTestHarness(java.io.File edifactSpecFile, java.lang.String... messages)
           
 
Method Summary
 void assertJavaReadWriteOK(java.io.InputStream edifactStream)
          Test that the supplied EDIDFACT input stream can be read and bound into a UNEdifactInterchange instance and then serialized back to EDIFACT, without altering the EDIFACT message.
 void assertJavaReadWriteOK(java.io.Reader edifactStream)
          Test that the supplied EDIDFACT input stream can be read and bound into a UNEdifactInterchange instance and then serialized back to EDIFACT, without altering the EDIFACT message.
 void assertXMLOK(java.io.InputStream edifactIn, java.io.InputStream expectedXMLOut)
           
 void assertXMLOK(java.io.InputStream edifactIn, java.io.InputStream expectedXMLOut, boolean validate)
           
 UNEdifactInterchange fromUNEdifact(org.xml.sax.InputSource ediSource, javax.xml.transform.Result... additionalResults)
           
 UNEdifactInterchange fromUNEdifact(java.io.InputStream ediStream, javax.xml.transform.Result... additionalResults)
           
 Archive getBindingModel()
           
 ArchiveClassLoader getBindingModelClassLoader()
           
 UNEdifactInterchangeFactory getFactory()
           
 Archive getMappingModel()
           
 ArchiveClassLoader getMappingModelClassLoader()
           
 java.lang.String getUrn()
           
 void setReportPath(java.lang.String reportPath)
           
 void smooksFilterSource(java.lang.String smooksConfig, javax.xml.transform.Source source, javax.xml.transform.Result... results)
           
 void toUNEdifact(UNEdifactInterchange interchange, java.io.Writer writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdifactDirTestHarness

public EdifactDirTestHarness(java.io.File edifactSpecFile,
                             java.lang.String... messages)
Method Detail

getUrn

public java.lang.String getUrn()

getMappingModel

public Archive getMappingModel()

getBindingModel

public Archive getBindingModel()

getMappingModelClassLoader

public ArchiveClassLoader getMappingModelClassLoader()

getBindingModelClassLoader

public ArchiveClassLoader getBindingModelClassLoader()

fromUNEdifact

public UNEdifactInterchange fromUNEdifact(java.io.InputStream ediStream,
                                          javax.xml.transform.Result... additionalResults)
                                   throws java.io.IOException
Specified by:
fromUNEdifact in interface UNEdifactInterchangeFactory
Throws:
java.io.IOException

fromUNEdifact

public UNEdifactInterchange fromUNEdifact(org.xml.sax.InputSource ediSource,
                                          javax.xml.transform.Result... additionalResults)
                                   throws java.io.IOException
Specified by:
fromUNEdifact in interface UNEdifactInterchangeFactory
Throws:
java.io.IOException

toUNEdifact

public void toUNEdifact(UNEdifactInterchange interchange,
                        java.io.Writer writer)
                 throws java.io.IOException
Specified by:
toUNEdifact in interface UNEdifactInterchangeFactory
Throws:
java.io.IOException

setReportPath

public void setReportPath(java.lang.String reportPath)
Specified by:
setReportPath in interface UNEdifactInterchangeFactory

getFactory

public UNEdifactInterchangeFactory getFactory()

assertJavaReadWriteOK

public void assertJavaReadWriteOK(java.io.InputStream edifactStream)
                           throws java.io.IOException
Test that the supplied EDIDFACT input stream can be read and bound into a UNEdifactInterchange instance and then serialized back to EDIFACT, without altering the EDIFACT message.

Parameters:
edifactStream - The EDIFACT input stream.
Throws:
java.io.IOException - Error reading/writing.

assertJavaReadWriteOK

public void assertJavaReadWriteOK(java.io.Reader edifactStream)
                           throws java.io.IOException
Test that the supplied EDIDFACT input stream can be read and bound into a UNEdifactInterchange instance and then serialized back to EDIFACT, without altering the EDIFACT message.

Parameters:
edifactStream - The EDIFACT input stream.
Throws:
java.io.IOException - Error reading/writing.

assertXMLOK

public void assertXMLOK(java.io.InputStream edifactIn,
                        java.io.InputStream expectedXMLOut)
                 throws java.io.IOException,
                        org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

assertXMLOK

public void assertXMLOK(java.io.InputStream edifactIn,
                        java.io.InputStream expectedXMLOut,
                        boolean validate)
                 throws java.io.IOException,
                        org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

smooksFilterSource

public void smooksFilterSource(java.lang.String smooksConfig,
                               javax.xml.transform.Source source,
                               javax.xml.transform.Result... results)


Copyright © 2011. All Rights Reserved.