org.jboss.test
Class LoginModulesTestCase

java.lang.Object
  extended byTestCase
      extended byorg.jboss.test.LoginModulesTestCase

public class LoginModulesTestCase
extends TestCase

Tests of the LoginModule classes.

See Also:
Serialized Form

Nested Class Summary
static class LoginModulesTestCase.HashTestLoginModule (src)
           
static class LoginModulesTestCase.TestLoginModule (src)
           
 
Constructor Summary
LoginModulesTestCase(java.lang.String testName)
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void setUp()
           
 void testAnon()
           
 void testAnonUsersRoles()
           
 void testIdentity()
           
 void testJdbc()
          Use this InstantDB script to setup tables: ; First load the JDBC driver and open a database.
 void testLdap()
           
 void testLdapNullPassword()
           
 void testNull()
           
 void testSimple()
           
 void testUsernamePassword()
           
 void testUsernamePasswordHash()
           
 void testUsersRoles()
           
 void testUsersRolesHash()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginModulesTestCase

public LoginModulesTestCase(java.lang.String testName)
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

testUsernamePassword

public void testUsernamePassword()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testUsernamePasswordHash

public void testUsernamePasswordHash()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testUsersRoles

public void testUsersRoles()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testUsersRolesHash

public void testUsersRolesHash()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testAnonUsersRoles

public void testAnonUsersRoles()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testAnon

public void testAnon()
              throws java.lang.Exception
Throws:
java.lang.Exception

testNull

public void testNull()
              throws java.lang.Exception
Throws:
java.lang.Exception

testIdentity

public void testIdentity()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testSimple

public void testSimple()
                throws java.lang.Exception
Throws:
java.lang.Exception

testLdap

public void testLdap()
              throws java.lang.Exception
Throws:
java.lang.Exception

testLdapNullPassword

public void testLdapNullPassword()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testJdbc

public void testJdbc()
              throws java.lang.Exception
Use this InstantDB script to setup tables: ; First load the JDBC driver and open a database. d org.enhydra.instantdb.jdbc.idbDriver; o jdbc:idb=/usr/local/src/cvsroot/jBoss/jboss/dist/conf/default/instantdb.properties; ; Create the Principal table e DROP TABLE Principals ; e CREATE TABLE Principals ( PrincipalID VARCHAR(64) PRIMARY KEY, Password VARCHAR(64) ); ; put some initial data in the table e INSERT INTO Principals VALUES ("scott", "echoman"); e INSERT INTO Principals VALUES ("stark", "javaman"); ; Create the Roles table e DROP TABLE Roles; e CREATE TABLE Roles ( PrincipalID VARCHAR(64) PRIMARY KEY, Role VARCHAR(64), RoleGroup VARCHAR(64) ); ; put some initial data in the table e INSERT INTO Roles VALUES ("scott", "Echo", ""); e INSERT INTO Roles VALUES ("scott", "caller_scott", "CallerPrincipal"); e INSERT INTO Roles VALUES ("stark", "Java", ""); e INSERT INTO Roles VALUES ("stark", "Coder", ""); e INSERT INTO Roles VALUES ("stark", "caller_stark", "CallerPrincipal"); c close;

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)