org.olat.group
Class BusinessGroupManagerImplTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.olat.core.test.OlatTestCase
              extended by org.olat.group.BusinessGroupManagerImplTest
All Implemented Interfaces:
junit.framework.Test, WindowControl

public class BusinessGroupManagerImplTest
extends OlatTestCase
implements WindowControl

Description:
TODO: Class Description for BusinessGroupManagerImplTest

Initial Date: Jul 28, 2004

Author:
patrick

Constructor Summary
BusinessGroupManagerImplTest(java.lang.String name)
           
 
Method Summary
 BusinessControl getBusinessControl()
           
 DTabs getDTabs()
           
 WindowBackOffice getWindowBackOffice()
           
 WindowControlInfo getWindowControlInfo()
           
 void makeFlat()
          Use only when coding the Activatable interface.
 void pop()
           
 void pushAsModalDialog(Component comp)
           
 void pushToMainArea(Component comp)
          put the component on the stack pane of the -current- guistack.
 void setError(java.lang.String string)
           
 void setInfo(java.lang.String string)
           
 void setWarning(java.lang.String string)
           
static junit.framework.Test suite()
          Export all test cases as suite.
 void testAddToWaitingListAndFireEvent()
          Add 3 idenities to the waiting list and check the position.
 void testCheckIfNamesExistsInContext()
           
 void testCreateAndPersistBuddyGroup()
          Test existence of BuddyGroups inserted in the setUp phase................
 void testDeleteBuddyGroup()
          test if removing a BuddyGroup really deletes everything it should.
 void testDeleteBusinessGroupWithoutWaitingGroup()
           
 void testDeleteBusinessGroupWithWaitingGroup()
           
 void testEnableDisableAndCheckForTool()
          checks if tools can be enabled disabled or checked against being enabled.
 void testMoveIdenityFromWaitingListToParticipant()
          Move identity 4 (wg4) from the waiting list to participant list.
 void testMoveRegisteredIdentityFromWaitingToParticipant()
           
 void testRemoveFromWaitingListAndFireEvent()
          Remove identity 2 (wg3) from the waiting list and check the position of identity 2.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BusinessGroupManagerImplTest

public BusinessGroupManagerImplTest(java.lang.String name)
Parameters:
name -
Method Detail

testCheckIfNamesExistsInContext

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

testCreateAndPersistBuddyGroup

public void testCreateAndPersistBuddyGroup()
                                    throws java.lang.Exception
Test existence of BuddyGroups inserted in the setUp phase................ this test rather tests the findXXX methods............................... so if the setup was ok, and this test also fulfilled, then it means that createAndPersistBuddyGroup works, and also the findXXX methods.

Throws:
java.lang.Exception

testEnableDisableAndCheckForTool

public void testEnableDisableAndCheckForTool()
                                      throws java.lang.Exception
checks if tools can be enabled disabled or checked against being enabled. TOols are configured with the help of the generic properties storage.

Throws:
java.lang.Exception

testDeleteBuddyGroup

public void testDeleteBuddyGroup()
                          throws java.lang.Exception
test if removing a BuddyGroup really deletes everything it should.

Throws:
java.lang.Exception

testAddToWaitingListAndFireEvent

public void testAddToWaitingListAndFireEvent()
                                      throws java.lang.Exception
Add 3 idenities to the waiting list and check the position. before test Waitinglist=[]
after test Waitinglist=[wg2,wg3,wg4]

Throws:
java.lang.Exception

testRemoveFromWaitingListAndFireEvent

public void testRemoveFromWaitingListAndFireEvent()
                                           throws java.lang.Exception
Remove identity 2 (wg3) from the waiting list and check the position of identity 2. before test Waitinglist=[wg2,wg3,wg4]
after test Waitinglist=[wg2,wg4]

Throws:
java.lang.Exception

testMoveIdenityFromWaitingListToParticipant

public void testMoveIdenityFromWaitingListToParticipant()
                                                 throws java.lang.Exception
Move identity 4 (wg4) from the waiting list to participant list. before test Waitinglist=[wg2,wg4]
after test Waitinglist=[wg2]
participant-list=[wg4]

Throws:
java.lang.Exception

testMoveRegisteredIdentityFromWaitingToParticipant

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

testDeleteBusinessGroupWithWaitingGroup

public void testDeleteBusinessGroupWithWaitingGroup()

testDeleteBusinessGroupWithoutWaitingGroup

public void testDeleteBusinessGroupWithoutWaitingGroup()

suite

public static junit.framework.Test suite()
                                  throws java.lang.Exception
Export all test cases as suite. Make sure you add your testcase to org.olat.test.AllTest.java

Returns:
test suite
Throws:
java.lang.Exception

pushToMainArea

public void pushToMainArea(Component comp)
Description copied from interface: WindowControl
put the component on the stack pane of the -current- guistack. useful for modal dialogs and such.

Specified by:
pushToMainArea in interface WindowControl

pushAsModalDialog

public void pushAsModalDialog(Component comp)
Specified by:
pushAsModalDialog in interface WindowControl

pop

public void pop()
Specified by:
pop in interface WindowControl

setInfo

public void setInfo(java.lang.String string)
Specified by:
setInfo in interface WindowControl

setError

public void setError(java.lang.String string)
Specified by:
setError in interface WindowControl

setWarning

public void setWarning(java.lang.String string)
Specified by:
setWarning in interface WindowControl

getDTabs

public DTabs getDTabs()

getWindowControlInfo

public WindowControlInfo getWindowControlInfo()
Specified by:
getWindowControlInfo in interface WindowControl
Returns:
the windowcontrolinfo

makeFlat

public void makeFlat()
Description copied from interface: WindowControl
Use only when coding the Activatable interface. flatens (that is, does 0 to n pop() 's to the level where this windowcontrol is located. Useful only when implementing the Activatable interface to dump all possible pushed components and return to "the base" which is the level at which the controller's initialcomponent resides.

Specified by:
makeFlat in interface WindowControl

getBusinessControl

public BusinessControl getBusinessControl()
Specified by:
getBusinessControl in interface WindowControl
Returns:
the businesscontrol, never null

getWindowBackOffice

public WindowBackOffice getWindowBackOffice()
Specified by:
getWindowBackOffice in interface WindowControl