|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.osesb.utilities.junit.OSESBTestCase
org.osesb.messagepipeline.test.DOMParserPipelineStageTest
public class DOMParserPipelineStageTest
JUnit Test for org.osesb.messagepipeline.builtinstages.DOMParserPipelineStage.
Tests a DOMParserPipelineStage, which extends PipelineStage with a runStage() method that parses XML to DOM and sets the current MessagePipeline message to the result and/or places the result on the MessagePipelineContext. DOMParserPipelineStage can be configured to check that XML is valid against one or more schemas using a XMLValidationPipelineStageConfiguration. The XMLValidationPipelineStageConfiguration is loaded by stageProcessingStarting(). If a XMLValidationPipelineStageConfiguration is not configured, then runStage() will parse the XML to DOM, but will not perform schema validation. If configured for schema validation, then the schemas are located according to the following ordered lookup:
| Field Summary |
|---|
| Fields inherited from class org.osesb.utilities.junit.OSESBTestCase |
|---|
configFile, log, reader, testDataDirectory, testProperties, thisClassName |
| Constructor Summary | |
|---|---|
DOMParserPipelineStageTest(java.lang.String name)
Construct a new instance. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
The main method runs all the tests in the text ui |
void |
setUp()
This method is called before a test is executed. |
static junit.framework.Test |
suite()
The suite method runs all the tests |
void |
tearDown()
This method is called after a test is executed. |
void |
testConfiguredSchemas()
Tests a DOMParserPipelineStage configured whewre the schema files are configured using a XMLArtifactListConfiguration. |
void |
testDynamicSchemaResolution()
For this test, DOMParserPipelineStage is configured to resolve schema locations to the configured instance of the XMLRepository using a) the messageType, b) the schemaLocationAttribute, or c) the noNamespaceSchemaLocation attribute. |
void |
testSetSchemaFiles()
Tests explicitly setting the schemas using setSchemaFiles(). |
| Methods inherited from class org.osesb.utilities.junit.OSESBTestCase |
|---|
getBooleanTestProperty, getIntTestProperty, getLongTestProperty, getTestResourcesAsStreams, getTestResourcesAsText, getTestResourcesFiles, loadTestProperties, readTestFilesAsStreams |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DOMParserPipelineStageTest(java.lang.String name)
| Method Detail |
|---|
public static junit.framework.Test suite()
public void setUp()
throws java.lang.Exception
setUp in class OSESBTestCasejava.lang.Exception
public void tearDown()
throws java.lang.Exception
tearDown in class OSESBTestCasejava.lang.Exceptionpublic static void main(java.lang.String[] args)
public void testDynamicSchemaResolution()
throws java.lang.Exception
java.lang.Exception
public void testConfiguredSchemas()
throws java.lang.Exception
java.lang.Exception
public void testSetSchemaFiles()
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||