Add tests on super constructor arguments.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@680412 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructor.java b/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructor.java
new file mode 100644
index 0000000..40c5a6a
--- /dev/null
+++ b/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructor.java
@@ -0,0 +1,10 @@
+package org.apache.felix.ipojo.test.scenarios.component;
+
+public class CallSuperConstructor extends ParentClass {
+    
+    public CallSuperConstructor() {
+        super("test");
+        System.out.println("plop");
+    } 
+
+}
diff --git a/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClass.java b/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClass.java
new file mode 100644
index 0000000..052ca83
--- /dev/null
+++ b/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClass.java
@@ -0,0 +1,11 @@
+package org.apache.felix.ipojo.test.scenarios.component;
+
+public class ParentClass {
+    
+    private String name;
+
+    public ParentClass(final String n) {
+        name = n;
+    } 
+
+}
diff --git a/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java b/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
index e3f29e4..fef6dc7 100644
--- a/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
+++ b/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
@@ -21,6 +21,7 @@
 import java.util.Properties;

 

 import org.apache.felix.ipojo.ComponentInstance;

+import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.architecture.Architecture;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

 import org.apache.felix.ipojo.test.scenarios.component.FooProviderType1;

@@ -292,6 +293,16 @@
         assertEquals("Check context", context, props.get("context"));

     }

     

+    public void testSuperCall() {

+        try {

+            Factory fact = Utils.getFactoryByName(context, "org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructor");

+            ComponentInstance ci = fact.createComponentInstance(null);

+            ci.dispose();

+        } catch (Throwable e) {

+            fail(e.getMessage());

+        }

+    }

+    

     

 

 }
\ No newline at end of file
diff --git a/ipojo/tests/manipulator/manipulation/src/main/resources/metadata.xml b/ipojo/tests/manipulator/manipulation/src/main/resources/metadata.xml
index f0a3063..6482f7d 100644
--- a/ipojo/tests/manipulator/manipulation/src/main/resources/metadata.xml
+++ b/ipojo/tests/manipulator/manipulation/src/main/resources/metadata.xml
@@ -91,4 +91,7 @@
 		factory-method="singleton" architecture="true">

 		<provides />

 	</component>

+	

+	<!-- Try calling super constructors -->

+	 <component className="org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructor" immediate="true"/>

 </ipojo>