sgoeschl 2005/01/20 07:47:51 Modified: yaafi/src/test/org/apache/fulcrum/yaafi TestComponent.java TestComponentImpl.java TestComponentTest.java Log: Synchronizing the changes between Fulcrum and my ongoing development Revision Changes Path 1.3 +1 -1 jakarta-turbine-fulcrum/yaafi/src/test/org/apache/fulcrum/yaafi/TestComponent.java Index: TestComponent.java =================================================================== RCS file: /home/cvs/jakarta-turbine-fulcrum/yaafi/src/test/org/apache/fulcrum/yaafi/TestComponent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 1.4 +6 -3 jakarta-turbine-fulcrum/yaafi/src/test/org/apache/fulcrum/yaafi/TestComponentImpl.java Index: TestComponentImpl.java =================================================================== RCS file: /home/cvs/jakarta-turbine-fulcrum/yaafi/src/test/org/apache/fulcrum/yaafi/TestComponentImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TestComponentImpl.java 8 Nov 2004 09:49:35 -0000 1.3 +++ TestComponentImpl.java 20 Jan 2005 15:47:51 -0000 1.4 @@ -47,6 +47,7 @@ public String foo; public String bar; public static boolean decomissioned; + public String componentName; public void initialize() throws Exception { @@ -56,7 +57,8 @@ public void contextualize(Context context) throws ContextException { - appRoot = (File) context.get( "urn:avalon:home" ); + this.appRoot = (File) context.get( "urn:avalon:home" ); + this.componentName = (String) context.get( "urn:avalon:name" ); } public void configure(Configuration configuration) throws ConfigurationException @@ -79,7 +81,8 @@ { setupLogger(this, "TestComponent"); getLogger().debug("TestComponent.test() was called"); - getLogger().debug("componentAppRoot = " + appRoot.getAbsolutePath()); + getLogger().debug("componentAppRoot = " + this.appRoot.getAbsolutePath()); + getLogger().debug("componentName = " + this.componentName); getLogger().debug("foo = " + this.foo ); getLogger().debug("bar = " + this.bar ); } 1.5 +13 -4 jakarta-turbine-fulcrum/yaafi/src/test/org/apache/fulcrum/yaafi/TestComponentTest.java Index: TestComponentTest.java =================================================================== RCS file: /home/cvs/jakarta-turbine-fulcrum/yaafi/src/test/org/apache/fulcrum/yaafi/TestComponentTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TestComponentTest.java 8 Nov 2004 09:49:35 -0000 1.4 +++ TestComponentTest.java 20 Jan 2005 15:47:51 -0000 1.5 @@ -58,12 +58,21 @@ */ public void testTestComponentDecomissioned() throws Exception { + // lookup the test component TestComponent testComponent = (TestComponent) this.lookup( TestComponent.ROLE ); assertFalse( TestComponentImpl.decomissioned ); - tearDown(); //only way to work - //this.release((Object)testComponent); - assertTrue( TestComponentImpl.decomissioned ); + + // decommision the test component + this.decommision( TestComponent.ROLE ); + assertTrue( TestComponentImpl.decomissioned ); + + // resurrect the test component - resurrecting a decommisioned service + // might need some reviewing but I'm quite happy with the semantics + testComponent = (TestComponent) this.lookup( + TestComponent.ROLE + ); + assertFalse( TestComponentImpl.decomissioned ); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]