Package org.jboss.test.microcontainer.support

Examples of org.jboss.test.microcontainer.support.SimpleBean


         deploy("IntroductionDependencyTestCaseNotAutomatic0.xml");
         try
         {
            validate();
            SimpleBean dependency = (SimpleBean) getBean("Dependency");
            checkInterceptedBean(dependency);
         }
         finally
         {
            undeploy("IntroductionDependencyTestCaseNotAutomatic0.xml");
         }
        
         try
         {
            getBean("Intercepted");
            fail("Bean should not be installed after the dependency is undeployed");
         }
         catch (IllegalStateException expected)
         {
            KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
            assertNotNull(context);
         }
         checkPlainBean();
        
         deploy("IntroductionDependencyTestCaseNotAutomatic0.xml");
         try
         {
            validate();
            SimpleBean dependency = (SimpleBean) getBean("Dependency");
            checkInterceptedBean(dependency);
            checkPlainBean();
         }
         finally
         {
View Full Code Here


   public void testInterceptorWithDependencyRedeploy2() throws Exception
   {
      deploy("IntroductionDependencyTestCaseNotAutomatic0.xml");
      try
      {
         SimpleBean dependency = (SimpleBean) getBean("Dependency");
         assertNotNull(dependency);
         deploy("IntroductionDependencyTestCaseNotAutomatic1.xml");
         try
         {
            validate();
View Full Code Here

      }
   }
  
   private void checkInterceptedBean(Object dependency)
   {
      SimpleBean bean = (SimpleBean) getBean("Intercepted");
      assertNotNull(bean);
      assertTrue(MarkerInterface.class.isAssignableFrom(bean.getClass()));
      InterceptorWithDependency.intercepted = null;
      bean.someMethod();
      assertTrue(dependency == InterceptorWithDependency.intercepted);
   }
View Full Code Here

      assertTrue(dependency == InterceptorWithDependency.intercepted);
   }

   private void checkPlainBean()
   {
      SimpleBean bean = (SimpleBean) getBean("Plain");
      assertNotNull(bean);
      assertFalse(MarkerInterface.class.isAssignableFrom(bean.getClass()));
      InterceptorWithDependency.intercepted = null;
      bean.someMethod();
      assertNull(InterceptorWithDependency.intercepted);
   }
View Full Code Here

   public void testLifecycleInterceptionsWithDependencyWrongOrder() throws Exception
   {
      deploy(getFile1());
      try
      {
         SimpleBean bean;
         try
         {
            bean = (SimpleBean) getBean("Intercepted");
            fail("'Interceped' should not be installed yet");
         }
View Full Code Here

   public void testLifecycleInterceptionsWithDependencyRedeploy() throws Exception
   {
      deploy(getFile1());
      try
      {
         SimpleBean bean;
         try
         {
            bean = (SimpleBean) getBean("Intercepted");
            fail("'Interceped' should not be installed yet");
         }
View Full Code Here

   {
      deploy(getDependency1DD());
      deploy(getDependency2DD());
      try
      {
         SimpleBean dependency1 = (SimpleBean) getBean("Dependency1");
         assertNotNull(dependency1);
         SimpleBean dependency2 = (SimpleBean) getBean("Dependency2");
         assertNotNull(dependency2);
         deploy(getMainDD());
         try
         {
            checkInterceptedAndInjected("Depends1", "A", dependency1);
View Full Code Here

TOP

Related Classes of org.jboss.test.microcontainer.support.SimpleBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.