[jboss-cvs] JBossAS SVN: r68103 - projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 10 09:32:09 EST 2007


Author: alesj
Date: 2007-12-10 09:32:09 -0500 (Mon, 10 Dec 2007)
New Revision: 68103

Modified:
   projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractBeanAnnotationAdapterTestCase.java
Log:
Test fix2.

Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractBeanAnnotationAdapterTestCase.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractBeanAnnotationAdapterTestCase.java	2007-12-10 14:30:18 UTC (rev 68102)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractBeanAnnotationAdapterTestCase.java	2007-12-10 14:32:09 UTC (rev 68103)
@@ -58,12 +58,7 @@
 
    protected void runAnnotations(Object bean) throws Throwable
    {
-      // bootstrap
-      BasicBootstrap bootstrap = new BasicBootstrap(new TestKernelConfig());
-      bootstrap.run();
-      Kernel kernel = bootstrap.getKernel();
-      KernelController controller = kernel.getController();
-      assertInstanceOf(controller, TestController.class);
+      KernelController controller = getController();
       String name = bean.toString();
       AbstractBeanMetaData beanMetaData = new AbstractBeanMetaData(name, bean.getClass().getName());
       try
@@ -76,6 +71,17 @@
       }
    }
 
+   protected KernelController getController() throws Throwable
+   {
+      // bootstrap
+      BasicBootstrap bootstrap = new BasicBootstrap(new TestKernelConfig());
+      bootstrap.run();
+      Kernel kernel = bootstrap.getKernel();
+      KernelController controller = kernel.getController();
+      assertInstanceOf(controller, TestController.class);
+      return controller;
+   }
+
    private class TestKernelConfig extends PropertyKernelConfig
    {
       public TestKernelConfig()




More information about the jboss-cvs-commits mailing list