org.jboss.test.kernel.junit
Class MicrocontainerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jboss.test.AbstractTestCase
              extended by org.jboss.test.AbstractTestCaseWithSetup
                  extended by org.jboss.test.kernel.junit.MicrocontainerTest
All Implemented Interfaces:
junit.framework.Test

public class MicrocontainerTest
extends org.jboss.test.AbstractTestCaseWithSetup

A MicrocontainerTest.

Version:
$Revision: 1.6 $
Author:
Adrian Brock

Constructor Summary
MicrocontainerTest(String name)
          Create a new Microcontainer test
 
Method Summary
protected  KernelDeployment deploy(String resource)
          Deploy a resource
protected  KernelDeployment deploy(URL url)
          Deploy a url
protected  Object getBean(Object name)
          Get a bean
protected  Object getBean(Object name, ControllerState state)
          Get a bean
protected  KernelControllerContext getControllerContext(Object name)
          Get a context
protected  KernelControllerContext getControllerContext(Object name, ControllerState state)
          Get a context
static org.jboss.test.AbstractTestDelegate getDelegate(Class clazz)
          Get the test delegate
protected  MicrocontainerTestDelegate getMCDelegate()
          Get the delegate
protected  void setUp()
           
protected  void undeploy(KernelDeployment deployment)
          Undeploy a deployment
protected  void validate()
          Validate
 
Methods inherited from class org.jboss.test.AbstractTestCaseWithSetup
enableTrace, getDelegate, getLog, resumeSecurity, suite, suspendSecurity, tearDown
 
Methods inherited from class org.jboss.test.AbstractTestCase
assertEmpty, assertEmpty, assertEmpty, assertEquals, assertEquals, assertEquals, assertEquals, assertInstanceOf, assertInstanceOf, checkDeepThrowable, checkDeepThrowableRethrow, checkThrowable, checkThrowableRethrow, configureLogging, deserialize, failure, findResource, getResource, serialize, serializeDeserialize
 
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

MicrocontainerTest

public MicrocontainerTest(String name)
Create a new Microcontainer test

Parameters:
name - the test name
Method Detail

getDelegate

public static org.jboss.test.AbstractTestDelegate getDelegate(Class clazz)
                                                       throws Exception
Get the test delegate

Parameters:
clazz - the test class
Returns:
the delegate
Throws:
Exception - for any error

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class org.jboss.test.AbstractTestCaseWithSetup
Throws:
Exception

getBean

protected Object getBean(Object name)
Get a bean

Parameters:
name - the bean name
Returns:
the bean
Throws:
IllegalStateException - when the bean does not exist

getBean

protected Object getBean(Object name,
                         ControllerState state)
Get a bean

Parameters:
name - the name of the bean
state - the state of the bean
Returns:
the bean
Throws:
IllegalStateException - when the bean does not exist at that state

getControllerContext

protected KernelControllerContext getControllerContext(Object name)
Get a context

Parameters:
name - the bean name
Returns:
the context
Throws:
IllegalStateException - when the context does not exist

getControllerContext

protected KernelControllerContext getControllerContext(Object name,
                                                       ControllerState state)
Get a context

Parameters:
name - the name of the bean
state - the state of the bean
Returns:
the context
Throws:
IllegalStateException - when the context does not exist at that state

deploy

protected KernelDeployment deploy(URL url)
                           throws Exception
Deploy a url

Parameters:
url - the deployment url
Returns:
the deployment
Throws:
Throwable - for any error
Exception

deploy

protected KernelDeployment deploy(String resource)
                           throws Exception
Deploy a resource

Parameters:
resource - the deployment resource
Returns:
the deployment
Throws:
Throwable - for any error
Exception

undeploy

protected void undeploy(KernelDeployment deployment)
Undeploy a deployment

Parameters:
deployment - the deployment

validate

protected void validate()
                 throws Exception
Validate

Throws:
Exception - for any error

getMCDelegate

protected MicrocontainerTestDelegate getMCDelegate()
Get the delegate

Returns:
the delegate


Copyright © 2004 JBoss Inc. All Rights Reserved.