Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.xpn.xwiki.test
Class LDAPTest  view LDAPTest download LDAPTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.xpn.xwiki.test.HibernateTestCase
              extended bycom.xpn.xwiki.test.LDAPTest
All Implemented Interfaces:
junit.framework.Test

public class LDAPTest
extends HibernateTestCase

Test for LDAP authentication *********************************************************************** This test need a TEST local LDAP server *********************************************************************** BEWARE : THIS TEST DELETE ALL LDAP SERVER CONTENTS ! NEVER USE IT WITH PRODUCTION SERVER ! *********************************************************************** If you use OpenLDAP server, the sldap.conf must containts the statements : include /etc/schema/cosine.schema include /etc/schema/inetorgperson.schema access to * by self read by anonymous auth by * none suffix "dc=xwiki,dc=com" rootdn "cn=Manager,dc=xwiki,dc=com" rootpw secret Other default values should work Test works with out of the box ldap database.


Field Summary
static boolean inTest
           
 
Fields inherited from class com.xpn.xwiki.test.HibernateTestCase
HIB_LOCATION
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
LDAPTest()
           
 
Method Summary
 void prepareData(boolean withLDAPDN, boolean withpassword)
           
 void prepareLDAP(boolean addUser, java.lang.String userPassword)
           
 void setUp()
          Sets up the fixture, for example, open a network connection.
 void testCheckLogonFromWiki()
           
 void testCheckLogonFromWikiBadLDAP()
           
 void testCheckLogonKOFromWikiPassword()
           
 void testCheckLogonLevel()
           
 void testCheckLogonWithBadBind()
           
 void testCheckLogonWithBind()
           
 void testCheckLogonWithoutBind()
           
 void testCheckLogonWithUserBind()
           
 void testTransfertUserFromLDAP()
           
 
Methods inherited from class com.xpn.xwiki.test.HibernateTestCase
cleanUp, cleanUp, getXWiki, getXWikiConfig, getXWikiContext, runSQL, tearDown
 
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

inTest

public static boolean inTest
Constructor Detail

LDAPTest

public LDAPTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Overrides:
setUp in class HibernateTestCase

prepareLDAP

public void prepareLDAP(boolean addUser,
                        java.lang.String userPassword)

prepareData

public void prepareData(boolean withLDAPDN,
                        boolean withpassword)
                 throws com.xpn.xwiki.XWikiException

testCheckLogonWithBind

public void testCheckLogonWithBind()
                            throws java.lang.ClassNotFoundException,
                                   java.lang.IllegalAccessException,
                                   java.lang.InstantiationException,
                                   com.xpn.xwiki.XWikiException

testCheckLogonWithoutBind

public void testCheckLogonWithoutBind()
                               throws java.lang.ClassNotFoundException,
                                      java.lang.IllegalAccessException,
                                      java.lang.InstantiationException,
                                      com.xpn.xwiki.XWikiException

testCheckLogonWithUserBind

public void testCheckLogonWithUserBind()
                                throws java.lang.ClassNotFoundException,
                                       java.lang.IllegalAccessException,
                                       java.lang.InstantiationException,
                                       com.xpn.xwiki.XWikiException

testCheckLogonWithBadBind

public void testCheckLogonWithBadBind()
                               throws java.lang.ClassNotFoundException,
                                      java.lang.IllegalAccessException,
                                      java.lang.InstantiationException,
                                      com.xpn.xwiki.XWikiException

testCheckLogonFromWiki

public void testCheckLogonFromWiki()
                            throws java.lang.ClassNotFoundException,
                                   java.lang.IllegalAccessException,
                                   java.lang.InstantiationException,
                                   com.xpn.xwiki.XWikiException

testCheckLogonFromWikiBadLDAP

public void testCheckLogonFromWikiBadLDAP()
                                   throws java.lang.ClassNotFoundException,
                                          java.lang.IllegalAccessException,
                                          java.lang.InstantiationException,
                                          com.xpn.xwiki.XWikiException

testCheckLogonKOFromWikiPassword

public void testCheckLogonKOFromWikiPassword()
                                      throws java.lang.ClassNotFoundException,
                                             java.lang.IllegalAccessException,
                                             java.lang.InstantiationException,
                                             com.xpn.xwiki.XWikiException

testCheckLogonLevel

public void testCheckLogonLevel()
                         throws java.lang.ClassNotFoundException,
                                java.lang.IllegalAccessException,
                                java.lang.InstantiationException,
                                com.xpn.xwiki.XWikiException

testTransfertUserFromLDAP

public void testTransfertUserFromLDAP()
                               throws java.lang.ClassNotFoundException,
                                      com.xpn.xwiki.XWikiException,
                                      java.lang.IllegalAccessException,
                                      java.lang.InstantiationException