[jboss-cvs] JBossAS SVN: r92825 - projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 26 06:57:36 EDT 2009


Author: kabir.khan at jboss.com
Date: 2009-08-26 06:57:36 -0400 (Wed, 26 Aug 2009)
New Revision: 92825

Added:
   projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java
Modified:
   projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/AsynchronousTestCase.java
   projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/ControllerTestSuite.java
Log:
[JBKERNEL-53] Add test, and make sure all tests are part of the testsuite

Modified: projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/AsynchronousTestCase.java
===================================================================
--- projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/AsynchronousTestCase.java	2009-08-26 10:35:59 UTC (rev 92824)
+++ projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/AsynchronousTestCase.java	2009-08-26 10:57:36 UTC (rev 92825)
@@ -35,6 +35,8 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import junit.framework.Test;
+
 import org.jboss.dependency.plugins.AbstractController;
 import org.jboss.dependency.plugins.AbstractDependencyItem;
 import org.jboss.dependency.spi.ControllerContext;
@@ -59,6 +61,11 @@
       super(name);
    }
 
+   public static Test suite()
+   {
+      return suite(AsynchronousTestCase.class);
+   }
+
    public void testSearchForExecutor() throws Throwable
    {
       class TestController extends AbstractController

Modified: projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/ControllerTestSuite.java
===================================================================
--- projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/ControllerTestSuite.java	2009-08-26 10:35:59 UTC (rev 92824)
+++ projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/ControllerTestSuite.java	2009-08-26 10:57:36 UTC (rev 92825)
@@ -42,22 +42,27 @@
    {
       TestSuite suite = new TestSuite("Dependency Controller Tests");
 
+      suite.addTest(AliasDependencyTestCase.suite());
+      suite.addTest(AliasUnitTestCase.suite());
+      suite.addTest(AsynchronousTestCase.suite());
+      suite.addTest(BadDependencyInfoTestCase.suite());
       suite.addTest(BasicControllerTestCase.suite());
       suite.addTest(BasicDependencyTestCase.suite());
-      suite.addTest(CrossContextDependencyTestCase.suite());
-      suite.addTest(ManualControllerTestCase.suite());
+      suite.addTest(CardinalityTestCase.suite());
       suite.addTest(ChangeAutomaticControllerTestCase.suite());
       suite.addTest(ChangeDependencyTestCase.suite());
+      suite.addTest(CrossContextDependencyBadObjectName2TestCase.suite());
+      suite.addTest(CrossContextDependencyBadObjectNameTestCase.suite());
+      suite.addTest(CrossContextDependencyTestCase.suite());
       suite.addTest(DisabledControllerTestCase.suite());
+      suite.addTest(ErrorControllerActionTestCase.suite());
+      suite.addTest(ManualControllerTestCase.suite());
       suite.addTest(OnDemandDependencyTestCase.suite());
+      suite.addTest(PreconfiguredScopeTestCase.suite());
       suite.addTest(RecursiveControllerActionTestCase.suite());
-      suite.addTest(ErrorControllerActionTestCase.suite());
-      suite.addTest(CrossContextDependencyBadObjectNameTestCase.suite());
-      suite.addTest(AliasDependencyTestCase.suite());
-      suite.addTest(AliasUnitTestCase.suite());
+      suite.addTest(SelfDependencyTestCase.suite());
       suite.addTest(ShutdownControllerTestCase.suite());
-      suite.addTest(BadDependencyInfoTestCase.suite());
-      suite.addTest(PreconfiguredScopeTestCase.suite());
+      suite.addTest(StateConsistencyUnitTestCase.suite());
 
       return suite;
    }

Added: projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java
===================================================================
--- projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java	                        (rev 0)
+++ projects/kernel/trunk/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java	2009-08-26 10:57:36 UTC (rev 92825)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.dependency.controller.test;
+
+import junit.framework.Test;
+import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.test.dependency.controller.support.TestDelegate;
+
+/**
+ * A BasicDependencyTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60558 $
+ */
+public class SelfDependencyTestCase extends AbstractDependencyTest
+{
+   public static Test suite()
+   {
+      return suite(SelfDependencyTestCase.class);
+   }
+   
+   public SelfDependencyTestCase(String name)
+   {
+      super(name);
+   }
+   
+   public void testDependencyCorrectOrder() throws Throwable
+   {
+      TestDelegate delegate = new TestDelegate("Self");
+      ControllerContext context = assertInstall(delegate);
+      DependencyItem dependency = new AbstractDependencyItem("Self", "Self", ControllerState.INSTALLED, ControllerState.INSTALLED);
+      delegate.addDependency(dependency);
+      dependency.resolve(controller);
+
+      assertUninstall(context);
+      assertNull(context.getError());
+   }
+}




More information about the jboss-cvs-commits mailing list