org.apache.avalon.fortress.testcase
Class FortressTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.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  org.apache.avalon.framework.service.ServiceManager getServiceManager()
          Returns a reference to the Fortress ServiceManager.
protected  org.apache.avalon.framework.context.Context initializeContext(org.apache.avalon.framework.context.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, failNotEquals, failNotSame, failSame
 
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
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

initializeContext

protected org.apache.avalon.framework.context.Context initializeContext(org.apache.avalon.framework.context.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 org.apache.avalon.framework.service.ServiceManager getServiceManager()
Returns a reference to the Fortress ServiceManager.

Returns:
The ServiceManager.


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.