org.alfresco
Class RepositoryStartStopTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.RepositoryStartStopTest
All Implemented Interfaces:
junit.framework.Test

public class RepositoryStartStopTest
extends junit.framework.TestCase

A unit test that verifies it's possible to start up the main Alfresco context, stop it, start a different context, stop that, and finally return to the main context. To do a basic check of if the repository works, use RepositoryStartupTest. This test allows you to verify that your context is able to shut down cleanly, as well as that the minimal context is able to do the same. As this test opens and closes lots of contexts, it is rather slow....


Constructor Summary
RepositoryStartStopTest()
           
 
Method Summary
static void assertAllCachesShutdown()
          Checks that all our EHCache instances have been shutdown
static void assertNoCachedApplicationContext()
          Checks that the ApplicationContext cache on the ApplicationContextHelper is empty
 void doTestBasicWriteOperations(org.springframework.context.ApplicationContext ctx)
           
 void setUp()
           
 void tearDown()
           
 void testOpenClose()
          Tests that we can open a context, use it, and then close it again without error
 void testOpenCloseOpenCloseFull()
          Using a full autostarting context: Test that we can bring up and close down a context twice without error, using it when running.
 void testOpenCloseOpenCloseNoAutostart()
          Using a minimal no-autostart context: Test that we can bring up and close down a context twice without error, using it when running.
 void testOpenCloseRepeatedly()
          Tests that we can open a context, use it, close it, and open a different one.
 
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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepositoryStartStopTest

public RepositoryStartStopTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

assertNoCachedApplicationContext

public static void assertNoCachedApplicationContext()
                                             throws java.lang.Exception
Checks that the ApplicationContext cache on the ApplicationContextHelper is empty

Throws:
java.lang.Exception

assertAllCachesShutdown

public static void assertAllCachesShutdown()
                                    throws java.lang.Exception
Checks that all our EHCache instances have been shutdown

Throws:
java.lang.Exception

testOpenClose

public void testOpenClose()
                   throws java.lang.Exception
Tests that we can open a context, use it, and then close it again without error

Throws:
java.lang.Exception

testOpenCloseOpenCloseNoAutostart

public void testOpenCloseOpenCloseNoAutostart()
                                       throws java.lang.Exception
Using a minimal no-autostart context: Test that we can bring up and close down a context twice without error, using it when running.

Throws:
java.lang.Exception

testOpenCloseOpenCloseFull

public void testOpenCloseOpenCloseFull()
                                throws java.lang.Exception
Using a full autostarting context: Test that we can bring up and close down a context twice without error, using it when running.

Throws:
java.lang.Exception

testOpenCloseRepeatedly

public void testOpenCloseRepeatedly()
                             throws java.lang.Exception
Tests that we can open a context, use it, close it, and open a different one. Does this by opening and closing contexts 4 different times, sometimes full ones, sometimes minimal ones with no autostart.

Throws:
java.lang.Exception

doTestBasicWriteOperations

public void doTestBasicWriteOperations(org.springframework.context.ApplicationContext ctx)
                                throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.