xmlBlaster 2.2.0 API

org.xmlBlaster.test.contrib.replication
Class TestReplicationWriter

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.custommonkey.xmlunit.XMLTestCase
              extended by org.xmlBlaster.test.contrib.replication.TestReplicationWriter
All Implemented Interfaces:
junit.framework.Test, org.custommonkey.xmlunit.XMLConstants, org.custommonkey.xmlunit.XSLTConstants

public class TestReplicationWriter
extends org.custommonkey.xmlunit.XMLTestCase

Tests the functionality of the ReplicationWriter.

 java -Ddb=oracle .....
 or if you want to use postgres:
 java -Ddb=postgres
 

What does this test ?


Author:
Michele Laghi

Field Summary
(package private)  DbMetaHelper dbHelper
           
private  I_DbPool dbPool
           
private  I_DbSpecific dbSpecific
           
private  I_Info info
           
private static java.util.logging.Logger log
           
private  I_Writer replicationWriter
           
private  long sleepDelay
           
private  SpecificHelper specificHelper
           
private  java.lang.String tableName
           
 
Fields inherited from interface org.custommonkey.xmlunit.XSLTConstants
XSLT_END, XSLT_IDENTITY_TEMPLATE, XSLT_START, XSLT_STRIP_WHITESPACE, XSLT_XML_OUTPUT_NOINDENT
 
Fields inherited from interface org.custommonkey.xmlunit.XMLConstants
CLOSE_NODE, END_CDATA, END_COMMENT, END_PROCESSING_INSTRUCTION, OPEN_END_NODE, OPEN_START_NODE, START_CDATA, START_COMMENT, START_DOCTYPE, START_PROCESSING_INSTRUCTION, XML_DECLARATION, XMLNS_PREFIX, XPATH_ATTRIBUTE_IDENTIFIER, XPATH_CHARACTER_NODE_IDENTIFIER, XPATH_COMMENT_IDENTIFIER, XPATH_NODE_INDEX_END, XPATH_NODE_INDEX_START, XPATH_PROCESSING_INSTRUCTION_IDENTIFIER, XPATH_SEPARATOR
 
Constructor Summary
TestReplicationWriter()
          Default ctor.
TestReplicationWriter(java.lang.String arg0)
          Constructor for TestReplicationWriter.
 
Method Summary
private  void createSeq(java.lang.String method, java.lang.String message, java.lang.String tableName)
          Used to test the feature.
private  java.lang.String displayInfo(java.lang.Object obj)
           
 void init(I_Info info)
           
static void main(java.lang.String[] args)
          Start the test.
 void processOneTable(java.sql.Connection conn, java.lang.String schemaName, java.lang.String tableName)
           
protected  void setUp()
          Configure database access.
private  DbPool setUpDbPool(I_Info info)
          Creates a database pooling instance and puts it to info.
 void shutdown()
           
protected  void tearDown()
           
 void testCreateSeq1()
           
 void testCreateSeq2()
           
 void testCreateSeq3()
           
 void testCreateSeq4()
           
 void testCreateSeq5()
           
 void testCreateSeq7()
           
 void testReadAllTables()
           
 
Methods inherited from class org.custommonkey.xmlunit.XMLTestCase
assertNodeTestPasses, assertNodeTestPasses, assertNotXpathExists, assertNotXpathExists, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLIdentical, assertXMLIdentical, assertXMLIdentical, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXpathEvaluatesTo, assertXpathEvaluatesTo, assertXpathExists, assertXpathExists, assertXpathNotExists, assertXpathNotExists, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, compareXML, compareXML, compareXML, compareXML, compareXML, setControlParser, setIgnoreWhitespace, setTestParser
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log

info

private I_Info info

dbPool

private I_DbPool dbPool

specificHelper

private SpecificHelper specificHelper

dbHelper

DbMetaHelper dbHelper

dbSpecific

private I_DbSpecific dbSpecific

replicationWriter

private I_Writer replicationWriter

tableName

private java.lang.String tableName

sleepDelay

private long sleepDelay
Constructor Detail

TestReplicationWriter

public TestReplicationWriter()
Default ctor.


TestReplicationWriter

public TestReplicationWriter(java.lang.String arg0)
Constructor for TestReplicationWriter.

Parameters:
arg0 -
Method Detail

main

public static void main(java.lang.String[] args)
Start the test.
 java -Ddb=oracle junit.swingui.TestRunner -noloading org.xmlBlaster.test.contrib.replication.TestReplicationWriter
 

Parameters:
args - Command line settings

setUp

protected void setUp()
              throws java.lang.Exception
Configure database access.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception
See Also:
TestCase#setUp()

init

public void init(I_Info info)
          throws java.lang.Exception
Throws:
java.lang.Exception

createSeq

private final void createSeq(java.lang.String method,
                             java.lang.String message,
                             java.lang.String tableName)
Used to test the feature.

Parameters:
method - The invoking method name.
message - The xml message to parse and process.
tableName - The name of the table to create.

shutdown

public void shutdown()

setUpDbPool

private DbPool setUpDbPool(I_Info info)
Creates a database pooling instance and puts it to info.

Parameters:
info - The configuration
Returns:
The created pool

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testCreateSeq1

public void testCreateSeq1()

testCreateSeq2

public void testCreateSeq2()

testCreateSeq3

public void testCreateSeq3()

testCreateSeq4

public void testCreateSeq4()

testCreateSeq5

public void testCreateSeq5()

testCreateSeq7

public void testCreateSeq7()

displayInfo

private java.lang.String displayInfo(java.lang.Object obj)

processOneTable

public void processOneTable(java.sql.Connection conn,
                            java.lang.String schemaName,
                            java.lang.String tableName)
                     throws java.lang.Exception
Throws:
java.lang.Exception

testReadAllTables

public void testReadAllTables()

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.