Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 19565 invoked from network); 24 Oct 2008 12:32:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Oct 2008 12:32:03 -0000 Received: (qmail 20888 invoked by uid 500); 24 Oct 2008 12:32:06 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 20857 invoked by uid 500); 24 Oct 2008 12:32:06 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 20848 invoked by uid 99); 24 Oct 2008 12:32:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2008 05:32:06 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2008 12:31:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5E1ED2388878; Fri, 24 Oct 2008 05:31:42 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r707613 - in /felix/trunk/ipojo/tests/manipulator/creation/src/main: java/org/apache/felix/ipojo/test/scenarios/component/ java/org/apache/felix/ipojo/test/scenarios/manipulation/ resources/ Date: Fri, 24 Oct 2008 12:31:41 -0000 To: commits@felix.apache.org From: clement@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081024123142.5E1ED2388878@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: clement Date: Fri Oct 24 05:31:41 2008 New Revision: 707613 URL: http://svn.apache.org/viewvc?rev=707613&view=rev Log: Add tests on the invocation of super contructors with the bundle context in parameter. Added: felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithBC.java felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClassWithBC.java Modified: felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java felix/trunk/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml Added: felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithBC.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithBC.java?rev=707613&view=auto ============================================================================== --- felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithBC.java (added) +++ felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithBC.java Fri Oct 24 05:31:41 2008 @@ -0,0 +1,13 @@ +package org.apache.felix.ipojo.test.scenarios.component; + +import org.osgi.framework.BundleContext; + +public class CallSuperConstructorWithBC extends ParentClassWithBC { + + public CallSuperConstructorWithBC(BundleContext bc) { + super("bc", bc, "bundle"); + String message = "plop-bc"; + System.out.println(message); + } + +} Added: felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClassWithBC.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClassWithBC.java?rev=707613&view=auto ============================================================================== --- felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClassWithBC.java (added) +++ felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClassWithBC.java Fri Oct 24 05:31:41 2008 @@ -0,0 +1,14 @@ +package org.apache.felix.ipojo.test.scenarios.component; + +import org.osgi.framework.BundleContext; + +public class ParentClassWithBC { + + private BundleContext bc; + + public ParentClassWithBC(String foo, BundleContext bc, String bar) { + this.bc = bc; + System.out.println(foo + " : " + this.bc + "(" + bar + ")"); + } + +} Modified: felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java?rev=707613&r1=707612&r2=707613&view=diff ============================================================================== --- felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java (original) +++ felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java Fri Oct 24 05:31:41 2008 @@ -303,6 +303,16 @@ } } + public void testSuperCallWithBC() { + try { + Factory fact = Utils.getFactoryByName(context, "org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructorWithBC"); + ComponentInstance ci = fact.createComponentInstance(null); + ci.dispose(); + } catch (Throwable e) { + fail(e.getMessage()); + } + } + } \ No newline at end of file Modified: felix/trunk/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml?rev=707613&r1=707612&r2=707613&view=diff ============================================================================== --- felix/trunk/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml (original) +++ felix/trunk/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml Fri Oct 24 05:31:41 2008 @@ -57,4 +57,5 @@ +