[jboss-cvs] JBossAS SVN: r92826 - projects/microcontainer/branches/Branch_2_0/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:58:12 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-08-26 06:58:12 -0400 (Wed, 26 Aug 2009)
New Revision: 92826
Added:
projects/microcontainer/branches/Branch_2_0/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java
Modified:
projects/microcontainer/branches/Branch_2_0/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/microcontainer/branches/Branch_2_0/dependency/src/test/java/org/jboss/test/dependency/controller/test/ControllerTestSuite.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/dependency/src/test/java/org/jboss/test/dependency/controller/test/ControllerTestSuite.java 2009-08-26 10:57:36 UTC (rev 92825)
+++ projects/microcontainer/branches/Branch_2_0/dependency/src/test/java/org/jboss/test/dependency/controller/test/ControllerTestSuite.java 2009-08-26 10:58:12 UTC (rev 92826)
@@ -42,22 +42,26 @@
{
TestSuite suite = new TestSuite("Dependency Controller Tests");
+ suite.addTest(AliasDependencyTestCase.suite());
+ suite.addTest(AliasUnitTestCase.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/microcontainer/branches/Branch_2_0/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java (rev 0)
+++ projects/microcontainer/branches/Branch_2_0/dependency/src/test/java/org/jboss/test/dependency/controller/test/SelfDependencyTestCase.java 2009-08-26 10:58:12 UTC (rev 92826)
@@ -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.DESCRIBED, ControllerState.INSTALLED);
+ delegate.addDependency(dependency);
+ dependency.resolve(controller);
+
+ assertUninstall(context);
+ assertNull(context.getError());
+ }
+}
More information about the jboss-cvs-commits
mailing list