|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.test.AbstractTestDelegate
org.jboss.test.kernel.junit.MicrocontainerTestDelegate
public class MicrocontainerTestDelegate
A MicrocontainerTestDelegate.
Field Summary | |
---|---|
protected ControllerMode |
defaultMode
The default mode |
protected BasicXMLDeployer |
deployer
The deployer |
protected Kernel |
kernel
The kernel |
Fields inherited from class org.jboss.test.AbstractTestDelegate |
---|
clazz, enableSecurity, log, logging, policy, securityPolicyName |
Constructor Summary | |
---|---|
MicrocontainerTestDelegate(Class<?> clazz)
Create a new MicrocontainerTestDelegate. |
Method Summary | ||
---|---|---|
protected void |
assertNoControllerContext(Object name,
ControllerState state)
Assert there is no context at the given state |
|
protected ControllerState |
change(KernelControllerContext context,
ControllerState required)
Change the context to the given state |
|
protected BasicXMLDeployer |
createDeployer()
|
|
protected void |
deploy()
Deploy the beans |
|
protected KernelControllerContext |
deploy(BeanMetaData beanMetaData)
Deploy a bean |
|
protected void |
deploy(KernelDeployment deployment)
Deploy a deployment |
|
protected KernelDeployment |
deploy(URL url)
Deploy a url |
|
protected Object |
getBean(Object name,
ControllerState state)
Get a bean |
|
protected
|
getBean(Object name,
ControllerState state,
Class<T> expected)
Get a bean |
|
protected AbstractBootstrap |
getBootstrap()
Get the kernel bootstrap |
|
protected KernelControllerContext |
getControllerContext(Object name,
ControllerState state)
Get a context |
|
ControllerMode |
getDefaultMode()
Get the defaultMode. |
|
protected KernelMetaDataRepository |
getMetaDataRepository()
Get the metadata repository |
|
protected String |
getTestName()
|
|
protected URL |
getTestResource(String testName)
|
|
protected KernelControllerContext |
handleNotFoundContext(Controller controller,
Object name,
ControllerState state)
Handle not found context. |
|
void |
setDefaultMode(ControllerMode defaultMode)
Set the defaultMode. |
|
void |
setUp()
|
|
protected void |
shutdown()
|
|
void |
tearDown()
|
|
protected void |
undeploy()
Undeploy all |
|
protected void |
undeploy(KernelControllerContext context)
Undeploy a bean |
|
protected void |
undeploy(KernelDeployment deployment)
Undeploy a deployment |
|
protected void |
undeploy(URL url)
Undeploy a deployment |
|
protected void |
validate()
Validate |
Methods inherited from class org.jboss.test.AbstractTestDelegate |
---|
enableTrace, getDelegate, getLog, log, setUpLogging, setUpSecurity, tearDownLogging, tearDownSecurity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Kernel kernel
protected BasicXMLDeployer deployer
protected ControllerMode defaultMode
Constructor Detail |
---|
public MicrocontainerTestDelegate(Class<?> clazz) throws Exception
clazz
- the test class
Exception
- for any errorMethod Detail |
---|
public void setUp() throws Exception
setUp
in class org.jboss.test.AbstractTestDelegate
Exception
protected BasicXMLDeployer createDeployer()
public void tearDown() throws Exception
tearDown
in class org.jboss.test.AbstractTestDelegate
Exception
public ControllerMode getDefaultMode()
public void setDefaultMode(ControllerMode defaultMode)
defaultMode
- the defaultMode.protected AbstractBootstrap getBootstrap() throws Exception
Exception
- for any errorprotected Object getBean(Object name, ControllerState state)
name
- the name of the beanstate
- the state of the bean
IllegalStateException
- when the bean does not exist at that stateprotected <T> T getBean(Object name, ControllerState state, Class<T> expected)
T
- the expected typename
- the name of the beanstate
- the state of the beanexpected
- the expected type
IllegalStateException
- when the bean does not exist at that stateprotected KernelMetaDataRepository getMetaDataRepository()
IllegalStateException
- when the bean does not exist at that stateprotected KernelControllerContext getControllerContext(Object name, ControllerState state)
name
- the name of the beanstate
- the state of the bean
IllegalStateException
- when the context does not exist at that stateprotected void assertNoControllerContext(Object name, ControllerState state)
name
- the name of the beanstate
- the state of the bean
IllegalStateException
- when the context exists at that stateprotected KernelControllerContext handleNotFoundContext(Controller controller, Object name, ControllerState state)
controller
- the controllername
- the name of the beanstate
- the state of the bean
IllegalStateException
- when the context does not exist at that stateprotected ControllerState change(KernelControllerContext context, ControllerState required) throws Throwable
context
- the contextrequired
- the required state
Throwable
- for any errorprotected void validate() throws Exception
Exception
- for any errorprotected KernelDeployment deploy(URL url) throws Exception
url
- the deployment url
Exception
- for any errorprotected KernelControllerContext deploy(BeanMetaData beanMetaData) throws Exception
beanMetaData
- the bean metadata
Exception
- for any errorprotected void deploy(KernelDeployment deployment) throws Exception
deployment
- the deployment
Exception
- for any errorprotected void undeploy(KernelControllerContext context)
context
- the contextprotected void undeploy(KernelDeployment deployment)
deployment
- the deploymentprotected void undeploy(URL url)
url
- the urlprotected void deploy() throws Exception
Exception
- for any errorprotected void shutdown()
protected String getTestName()
protected URL getTestResource(String testName)
protected void undeploy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |