org.logicalcobwebs.proxool.configuration
Class JAXPConfiguratorTest

java.lang.Object
  extended by TestCase
      extended by org.logicalcobwebs.proxool.AbstractProxoolTest
          extended by org.logicalcobwebs.proxool.configuration.JAXPConfiguratorTest

public class JAXPConfiguratorTest
extends AbstractProxoolTest

Tests that the JAXPConfgiuration works in various scenarios. This is also a test of the XMLConfigurator, as it is delegated to.

Since:
Proxool 0.6
Version:
$Revision: 1.16 $, $Date: 2003/08/30 14:54:23 $
Author:
Christian Nedregaard (christian_nedregaard@email.com), $Author: billhorsman $ (current maintainer)

Constructor Summary
JAXPConfiguratorTest(java.lang.String name)
           
 
Method Summary
private static java.lang.String getWorkingDirectoryUrl()
           
 void testNoNamspaces()
          Test that the confguration succeds and that all expected properties has been received by Proxool.
 void testValidiation()
          Test that the confguration succeds and that all expected properties has been received by Proxool, and that validiation succceds.
 void testValidiationFailure()
          Test that the confguration fails when validiation is turned on and the given xml is not valid.
 void testWithAlias()
          Test that we can retrieve a conncetion using the alias after registration
 void testWithNamspaces()
          Test that the confguration succeds and that all expected properties has been received by Proxool.
 
Methods inherited from class org.logicalcobwebs.proxool.AbstractProxoolTest
setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXPConfiguratorTest

public JAXPConfiguratorTest(java.lang.String name)
See Also:
junit.framework.TestCase#TestCase
Method Detail

testNoNamspaces

public void testNoNamspaces()
                     throws ProxoolException,
                            java.sql.SQLException
Test that the confguration succeds and that all expected properties has been received by Proxool. This test is done with a xml without namespaces and validiation.

Throws:
ProxoolException - if the configuration fails.
java.sql.SQLException - if ProxoolFacade operation fails.

testWithNamspaces

public void testWithNamspaces()
                       throws ProxoolException,
                              java.sql.SQLException
Test that the confguration succeds and that all expected properties has been received by Proxool. This test is done with a xml with namespaces and without validiation.

Throws:
ProxoolException - if the configuration fails.
java.sql.SQLException - if ProxoolFacade operation fails.

testValidiation

public void testValidiation()
                     throws ProxoolException,
                            java.sql.SQLException,
                            java.io.FileNotFoundException
Test that the confguration succeds and that all expected properties has been received by Proxool, and that validiation succceds. This test is done with a xml without namespaces.

Throws:
ProxoolException - if the configuration fails.
java.sql.SQLException - if ProxoolFacade operation fails.
java.io.FileNotFoundException - if the xml file is not found.

testWithAlias

public void testWithAlias()
                   throws ProxoolException,
                          java.sql.SQLException,
                          java.io.FileNotFoundException
Test that we can retrieve a conncetion using the alias after registration

Throws:
ProxoolException - if the configuration fails.
java.sql.SQLException - if ProxoolFacade operation fails.
java.io.FileNotFoundException - if the xml file is not found.

testValidiationFailure

public void testValidiationFailure()
                            throws java.sql.SQLException,
                                   java.io.FileNotFoundException,
                                   ProxoolException
Test that the confguration fails when validiation is turned on and the given xml is not valid.

Throws:
java.sql.SQLException - if ProxoolFacade operation fails.
java.io.FileNotFoundException - if the xml file is not found.
ProxoolException

getWorkingDirectoryUrl

private static java.lang.String getWorkingDirectoryUrl()