org.apache.avalon.fortress.testcase
Class FortressTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.avalon.fortress.testcase.FortressTestCase
All Implemented Interfaces:
junit.framework.Test

public class FortressTestCase
extends junit.framework.TestCase

JUnit TestCase for Components run under Fortress.

Version:
$Id: ExcaliburTestCase.java,v 1.6 2004/02/28 11:47:27 cziegeler Exp $
Author:
Avalon Development Team

Constructor Summary
FortressTestCase(java.lang.String name)
           
 
Method Summary
protected  ServiceManager getServiceManager()
          Returns a reference to the Fortress ServiceManager.
protected  Context initializeContext(Context context)
          Gives sublasses the oportunity to modify the Context before it is used to create the Container.
 void setUp()
           
 void 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
 

Constructor Detail

FortressTestCase

public FortressTestCase(java.lang.String name)
Method Detail

setUp

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

tearDown

public void tearDown()

initializeContext

protected Context initializeContext(Context context)
Gives sublasses the oportunity to modify the Context before it is used to create the Container.

The context provided will have been marked read-only. To make modifications to the context, it must first be wrapped in a new context instance as follows:

   DefaultContext newContext = new DefaultContext( context );
   newContext.put( "key", "value" );
   newContext.makeReadOnly();
   return newContext;
 
This version of the method simply returns the context instance unmodified.

Parameters:
context - The base Context object.
Returns:
The context which will be used to create the Container.

getServiceManager

protected ServiceManager getServiceManager()
Returns a reference to the Fortress ServiceManager.

Returns:
The ServiceManager.


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.