org.apache.derbyTesting.functionTests.tests.jdbcapi
Class LDAPAuthenticationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.derbyTesting.junit.BaseTestCase
              extended by org.apache.derbyTesting.junit.BaseJDBCTestCase
                  extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.LDAPAuthenticationTest
All Implemented Interfaces:
junit.framework.Test

public class LDAPAuthenticationTest
extends BaseJDBCTestCase


Field Summary
private static java.lang.String dnString
           
private static java.lang.String ldapContextFactory
           
private static java.lang.String ldapPassword
           
private static java.lang.String ldapPort
           
private static java.lang.String ldapServer
           
private static java.lang.String ldapUser
           
private static java.lang.String POLICY_FILE_NAME
           
private static java.lang.String TARGET_POLICY_FILE_NAME
           
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
LDAPAuthenticationTest(java.lang.String name)
          Creates a new instance of the Test
 
Method Summary
protected  void assertDSSystemShutdownOK(java.lang.String user, java.lang.String password)
           
protected  void assertInvalidLDAPDrvMgrConnectionFails(java.lang.String dbName, java.lang.String user, java.lang.String password)
           
 void assertInvalidLDAPDSConnectionFails(javax.sql.DataSource ds, java.lang.String user, java.lang.String password)
           
protected  void assertLDAPDrvMgrConnectionOK(java.lang.String dbName, java.lang.String user, java.lang.String password)
           
 void assertLDAPDSConnectionOK(javax.sql.DataSource ds, java.lang.String user, java.lang.String password)
           
static junit.framework.Test baseSuite(java.lang.String name, java.lang.String fixture)
           
protected  void cleanup(javax.sql.DataSource ds)
           
private static junit.framework.Test decorateWithPolicy(junit.framework.Test test)
           
protected  java.lang.String getDatabaseProperty(java.lang.String propertyName, java.sql.Connection conn)
           
protected  void initializeConnection(java.sql.Connection conn)
          Ensure all connections are not in auto commit mode.
private  java.lang.String makeServerPolicyName()
          Construct the name of the server policy file.
protected static void setBaseProps(junit.framework.TestSuite suite, junit.framework.Test test)
           
protected  void setDatabaseProperty(java.lang.String propertyName, java.lang.String value, java.sql.Connection conn)
           
static junit.framework.Test suite()
           
protected  void tearDown()
          Tear down this fixture, sub-classes should call super.tearDown().
 void testLDAPConnection()
           
 
Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestCase
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertTableRowCount, assertUpdateCount, assertUpdateCount, checkAllConsistency, checkEstimatedRowCount, commit, createStatement, createStatement, createStatement, dropTable, dropTable, getConnection, getDatabaseProperty, getLastSQLException, openConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbedded
 
Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, setUp, 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

ldapServer

private static java.lang.String ldapServer

ldapPort

private static java.lang.String ldapPort

dnString

private static java.lang.String dnString

ldapUser

private static java.lang.String ldapUser

ldapPassword

private static java.lang.String ldapPassword

ldapContextFactory

private static java.lang.String ldapContextFactory

POLICY_FILE_NAME

private static java.lang.String POLICY_FILE_NAME

TARGET_POLICY_FILE_NAME

private static java.lang.String TARGET_POLICY_FILE_NAME
Constructor Detail

LDAPAuthenticationTest

public LDAPAuthenticationTest(java.lang.String name)
Creates a new instance of the Test

Method Detail

initializeConnection

protected void initializeConnection(java.sql.Connection conn)
                             throws java.sql.SQLException
Ensure all connections are not in auto commit mode.

Overrides:
initializeConnection in class BaseJDBCTestCase
Parameters:
conn - Connection to be intialized
Throws:
java.sql.SQLException - Error setting the initial state.

suite

public static junit.framework.Test suite()

baseSuite

public static junit.framework.Test baseSuite(java.lang.String name,
                                             java.lang.String fixture)

setBaseProps

protected static void setBaseProps(junit.framework.TestSuite suite,
                                   junit.framework.Test test)

decorateWithPolicy

private static junit.framework.Test decorateWithPolicy(junit.framework.Test test)

makeServerPolicyName

private java.lang.String makeServerPolicyName()
Construct the name of the server policy file.


tearDown

protected void tearDown()
                 throws java.lang.Exception
Description copied from class: BaseJDBCTestCase
Tear down this fixture, sub-classes should call super.tearDown(). This cleanups & closes the connection if it is open and any statement objects returned through the utility methods.

Overrides:
tearDown in class BaseJDBCTestCase
Throws:
java.lang.Exception

setDatabaseProperty

protected void setDatabaseProperty(java.lang.String propertyName,
                                   java.lang.String value,
                                   java.sql.Connection conn)
                            throws java.sql.SQLException
Throws:
java.sql.SQLException

getDatabaseProperty

protected java.lang.String getDatabaseProperty(java.lang.String propertyName,
                                               java.sql.Connection conn)
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException

testLDAPConnection

public void testLDAPConnection()
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

cleanup

protected void cleanup(javax.sql.DataSource ds)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

assertLDAPDSConnectionOK

public void assertLDAPDSConnectionOK(javax.sql.DataSource ds,
                                     java.lang.String user,
                                     java.lang.String password)
                              throws java.sql.SQLException
Throws:
java.sql.SQLException

assertLDAPDrvMgrConnectionOK

protected void assertLDAPDrvMgrConnectionOK(java.lang.String dbName,
                                            java.lang.String user,
                                            java.lang.String password)
                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

assertInvalidLDAPDSConnectionFails

public void assertInvalidLDAPDSConnectionFails(javax.sql.DataSource ds,
                                               java.lang.String user,
                                               java.lang.String password)
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException

assertInvalidLDAPDrvMgrConnectionFails

protected void assertInvalidLDAPDrvMgrConnectionFails(java.lang.String dbName,
                                                      java.lang.String user,
                                                      java.lang.String password)
                                               throws java.sql.SQLException
Throws:
java.sql.SQLException

assertDSSystemShutdownOK

protected void assertDSSystemShutdownOK(java.lang.String user,
                                        java.lang.String password)
                                 throws java.sql.SQLException
Throws:
java.sql.SQLException

Built on Thu 2009-11-26 18:42:53-0800, from revision 884739

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.