|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jboss.test.AbstractTestCase
org.jboss.test.AbstractTestCaseWithSetup
org.jboss.test.kernel.junit.MicrocontainerTest
public class MicrocontainerTest
A MicrocontainerTest.
| Constructor Summary | |
|---|---|
MicrocontainerTest(String name)
Create a new Microcontainer test |
|
MicrocontainerTest(String name,
boolean autowireCandidate)
|
|
| Method Summary | ||
|---|---|---|
protected void |
afterSetUp()
Configure after set up. |
|
protected
|
assertBean(Object name,
Class<T> expected)
Get a bean |
|
protected
|
assertBean(Object name,
ControllerState state,
Class<T> expected)
Get a bean |
|
protected void |
assertNoBean(Object name)
Assert there is no bean |
|
protected void |
assertNoBean(Object name,
ControllerState state)
Assert there is no bean |
|
protected void |
assertNoControllerContext(Object name,
ControllerState state)
Assert there is no context at the given state |
|
protected void |
autowireThis()
Autowire this test instance. |
|
ControllerState |
change(KernelControllerContext context,
ControllerState required)
Change the context to the given state |
|
protected void |
clearAutowire()
Clear things after autowiring. |
|
protected String |
createTestBeanName()
Get the test's bean name. |
|
protected KernelControllerContext |
deploy(BeanMetaData beanMetaData)
Deploy a bean |
|
protected void |
deploy(KernelDeployment deployment)
Deploy a deployment |
|
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 KernelMetaDataRepository |
getMetaDataRepository()
Get the metadata repository |
|
protected String |
getMethodDeployment()
|
|
protected URL |
getMethodResource()
|
|
protected void |
setAutowireCandidate(boolean autowireCandidate)
Set the autowire flag. |
|
protected void |
setUp()
|
|
protected void |
shutdown()
Shutdown the controller |
|
protected void |
tearDown()
|
|
protected void |
undeploy(KernelControllerContext context)
Undeploy a bean |
|
protected void |
undeploy(KernelDeployment deployment)
Undeploy a deployment |
|
protected void |
undeploy(String resource)
Undeploy a deployment |
|
protected void |
validate()
Validate |
|
| Methods inherited from class org.jboss.test.AbstractTestCaseWithSetup |
|---|
enableTrace, getDelegate, getLog, resumeSecurity, suite, suspendSecurity |
| 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, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MicrocontainerTest(String name)
name - the test name
public MicrocontainerTest(String name,
boolean autowireCandidate)
| Method Detail |
|---|
public static org.jboss.test.AbstractTestDelegate getDelegate(Class<?> clazz)
throws Exception
clazz - the test class
Exception - for any error
protected void setUp()
throws Exception
setUp in class org.jboss.test.AbstractTestCaseWithSetupExceptionprotected String getMethodDeployment()
protected URL getMethodResource()
protected void afterSetUp()
throws Exception
Exception - for any error
protected void tearDown()
throws Exception
tearDown in class org.jboss.test.AbstractTestCaseWithSetupException
protected void autowireThis()
throws Exception
Exception - for any errorprotected String createTestBeanName()
protected void clearAutowire()
protected Object getBean(Object name)
name - the bean name
IllegalStateException - when the bean does not exist
protected 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 state
protected <T> T assertBean(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 state
protected <T> T assertBean(Object name,
Class<T> expected)
T - the expected typename - the name of the beanexpected - the expected type
IllegalStateException - when the bean does not exist at that stateprotected void assertNoBean(Object name)
name - the name of the bean
IllegalStateException - when the bean exists
protected void assertNoBean(Object name,
ControllerState state)
name - the name of the beanstate - the context state
IllegalStateException - when the bean existsprotected KernelControllerContext getControllerContext(Object name)
name - the bean name
IllegalStateException - when the context does not exist
protected 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 state
protected void assertNoControllerContext(Object name,
ControllerState state)
name - the name of the beanstate - the state of the bean
IllegalStateException - when the context exists at that state
public ControllerState change(KernelControllerContext context,
ControllerState required)
throws Throwable
context - the contextrequired - the required state
Throwable - for any error
protected KernelDeployment deploy(URL url)
throws Exception
url - the deployment url
Exception - for any error
protected KernelDeployment deploy(String resource)
throws Exception
resource - the deployment resource
Exception - for any error
protected KernelControllerContext deploy(BeanMetaData beanMetaData)
throws Exception
beanMetaData - the bean metadata
Exception - for any error
protected 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(String resource)
resource - the url
protected void validate()
throws Exception
Exception - for any errorprotected KernelMetaDataRepository getMetaDataRepository()
IllegalStateException - when the bean does not exist at that stateprotected void shutdown()
protected MicrocontainerTestDelegate getMCDelegate()
protected void setAutowireCandidate(boolean autowireCandidate)
autowireCandidate - the autowire flag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||