org.exoplatform.commons.testing
Class AbstractExoContainerTestCase

java.lang.Object
  extended by org.exoplatform.commons.testing.AbstractExoContainerTestCase
Direct Known Subclasses:
AbstractJCRTestCase

public abstract class AbstractExoContainerTestCase
extends Object

A base test class that allows to load an exo container with a selected set of components. It is aimed at running lighter test cases than the StandaloneContainer. Example usage :

Version:
$Revision$
Author:
Patrice Lamarque

Constructor Summary
AbstractExoContainerTestCase()
           
 
Method Summary
protected  void afterContainerStart()
           
protected  void beforeContainerStart()
           
protected
<T,U extends T>
U
getComponent(Class<T> key)
          Get a component from current container
protected
<T,I extends T>
void
registerComponent(Class<T> key, I instance)
          Register a component to the container
protected
<T,I extends T>
void
replaceComponent(Class<T> key, I instance)
          Replace a component implementation by registering it against the current container
 void startContainer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExoContainerTestCase

public AbstractExoContainerTestCase()
Method Detail

startContainer

public final void startContainer()

afterContainerStart

protected void afterContainerStart()

beforeContainerStart

protected void beforeContainerStart()

registerComponent

protected <T,I extends T> void registerComponent(Class<T> key,
                                                 I instance)
Register a component to the container

Parameters:
key - component key
instance - component instance to register

getComponent

protected <T,U extends T> U getComponent(Class<T> key)
Get a component from current container

Type Parameters:
T - type of component (key)
U - type of component implementation (type)
Parameters:
key - class of the registered component
Returns:

replaceComponent

protected <T,I extends T> void replaceComponent(Class<T> key,
                                                I instance)
Replace a component implementation by registering it against the current container

Parameters:
key - component key
instance - component instance to register


Copyright © 2013 eXo Platform SAS. All Rights Reserved.