Package org.jboss.test.dependency.controller.support

Examples of org.jboss.test.dependency.controller.support.RecursiveControllerContext


   }
  
   public void testInstall() throws Throwable
   {
      TestDelegate delegate = new TestDelegate("InstallTestRecursive");
      RecursiveControllerContext context = new RecursiveControllerContext(delegate, this);
      assertInstall(context, ControllerState.INSTALLED);
      TestDelegate childDelegate = context.child.getDelegate();
      assertEquals(1, delegate.describeInstallOrder);
      assertEquals(2, delegate.instantiateInstallOrder);
      assertEquals(3, delegate.configureInstallOrder);
View Full Code Here


   }
  
   public void testUninstall() throws Throwable
   {
      TestDelegate delegate = new TestDelegate("UninstallTestRecursive");
      RecursiveControllerContext context = new RecursiveControllerContext(delegate, this);
      assertInstall(context, ControllerState.INSTALLED);
      TestDelegate childDelegate = context.child.getDelegate();
      assertUninstall(context);
      if (context.child.error != null)
         throw context.child.error;
View Full Code Here

   }
  
   public void testReinstall() throws Throwable
   {
      TestDelegate delegate = new TestDelegate("ReinstallTestRecursive");
      RecursiveControllerContext context = new RecursiveControllerContext(delegate, this);
      assertInstall(context, ControllerState.INSTALLED);
      TestDelegate childDelegate = context.child.getDelegate();
      assertUninstall(context);
      if (context.child.error != null)
         throw context.child.error;
      context = new RecursiveControllerContext(delegate, this);
      assertInstall(context, ControllerState.INSTALLED);
      TestDelegate childDelegate2 = context.child.getDelegate();
      if (context.child.error != null)
         throw context.child.error;
      assertEquals(25, delegate.describeInstallOrder);
View Full Code Here

   }
  
   public void installChild(RecursiveControllerContext context) throws Throwable
   {
      TestDelegate delegate = new TestDelegate(context.getName() + "Child");
      context.child = new RecursiveControllerContext(delegate, null);
      assertInstall(context.child, ControllerState.INSTALLED);
   }
View Full Code Here

   }
  
   public void testInstall() throws Throwable
   {
      TestDelegate delegate = new TestDelegate("InstallTestRecursive");
      RecursiveControllerContext context = new RecursiveControllerContext(delegate, this);

      TestDelegate other = new TestDelegate("Other");
      TestControllerContext otherContext = new TestControllerContext(other);
      DependencyItem item = new AbstractDependencyItem(other.getName(), delegate.getName(), ControllerState.CREATE, ControllerState.CONFIGURED);
      otherContext.getDependencyInfo().addIDependOn(item);
View Full Code Here

   }
  
   public void testUninstall() throws Throwable
   {
      TestDelegate delegate = new TestDelegate("UninstallTestRecursive");
      RecursiveControllerContext context = new RecursiveControllerContext(delegate, this);

      TestDelegate other = new TestDelegate("Other");
      TestControllerContext otherContext = new TestControllerContext(other);
      DependencyItem item = new AbstractDependencyItem(other.getName(), delegate.getName(), ControllerState.CREATE, ControllerState.CONFIGURED);
      otherContext.getDependencyInfo().addIDependOn(item);
View Full Code Here

   }
  
   public void testReinstall() throws Throwable
   {
      TestDelegate delegate = new TestDelegate("ReinstallTestRecursive");
      RecursiveControllerContext context = new RecursiveControllerContext(delegate, this);

      TestDelegate other = new TestDelegate("Other");
      TestControllerContext otherContext = new TestControllerContext(other);
      DependencyItem item = new AbstractDependencyItem(other.getName(), delegate.getName(), ControllerState.CREATE, ControllerState.CONFIGURED);
      otherContext.getDependencyInfo().addIDependOn(item);
      assertInstall(otherContext, ControllerState.CONFIGURED);

      assertInstall(context, ControllerState.INSTALLED);
      assertContext(otherContext, ControllerState.INSTALLED);
      assertContext(context.child, ControllerState.INSTALLED);

      assertUninstall(context);
      if (context.child.error != null)
         throw context.child.error;
      assertNoContext(context.child);
      assertContext(otherContext, ControllerState.CONFIGURED);
     
      context = new RecursiveControllerContext(delegate, this);
      assertInstall(context, ControllerState.INSTALLED);
      if (context.child.error != null)
         throw context.child.error;
      assertContext(otherContext, ControllerState.INSTALLED);
      assertContext(context.child, ControllerState.INSTALLED);
View Full Code Here

      RecursiveControllerContext[] contexts = new RecursiveControllerContext[delegates.length];
      TestDelegate other = new TestDelegate("Other ");
      for (int i = 0; i < delegates.length; ++i)
      {
         delegates[i] = new TestDelegate("InstallTestRecursive " + i);
         contexts[i] = new RecursiveControllerContext(delegates[i], this);
         DependencyItem item = new AbstractDependencyItem(delegates[i].getName(), other.getName(), ControllerState.CREATE, ControllerState.CONFIGURED);
         contexts[i].getDependencyInfo().addIDependOn(item);
         assertInstall(contexts[i], ControllerState.CONFIGURED);
      }
     
View Full Code Here

   public void installChild(RecursiveControllerContext context) throws Throwable
   {
      if (++depth > 1)
         throw new IllegalStateException("Should not recurse depth=" + depth);
      TestDelegate delegate = new TestDelegate(context.getName() + "Child");
      context.child = new RecursiveControllerContext(delegate, null);
      assertInstall(context.child, ControllerState.INSTALLED);
      depth--;
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.dependency.controller.support.RecursiveControllerContext

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.