felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r722146 [5/15] - in /felix/trunk/ipojo: examples/junit4osgi/felix-command/ examples/junit4osgi/immediate-launcher/ examples/junit4osgi/junit4osgi/ examples/junit4osgi/maven-junit4osgi-plugin/ examples/junit4osgi/swing-runner/ tests/composit...
Date Mon, 01 Dec 2008 17:44:17 GMT
Modified: felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestBothProperties.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestBothProperties.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestBothProperties.java (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestBothProperties.java Mon Dec  1 09:44:13 2008
@@ -33,7 +33,7 @@
 
     
     public void setUp() {
-        Factory fact = Utils.getFactoryByName(context, "CONFIG-BothConfigurableCheckService");
+        Factory fact = Utils.getFactoryByName(getContext(), "CONFIG-BothConfigurableCheckService");
         Properties props = new Properties();
         props.put("instance.name","under-test");
         props.put("b", "1");
@@ -78,9 +78,9 @@
     }
     
     public void testConfigurationPrimitive() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -121,9 +121,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -165,9 +165,9 @@
     }
 
     public void testConfigurationPrimitiveString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -208,9 +208,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -252,9 +252,9 @@
     }
     
     public void testConfigurationPrimitiveArrays() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -311,9 +311,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -371,9 +371,9 @@
     }
 
     public void testConfigurationPrimitiveArraysString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -430,9 +430,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -490,9 +490,9 @@
     }
     
     public void testConfigurationObj() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -511,9 +511,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -532,9 +532,9 @@
     }
 
     public void testConfigurationObjString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -553,9 +553,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -622,9 +622,9 @@
     }
 
     public void testConfigurationPrimitiveNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -665,9 +665,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -709,9 +709,9 @@
     }
 
     public void testConfigurationPrimitiveArraysNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -752,9 +752,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -812,9 +812,9 @@
     }
 
     public void testConfigurationObjNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         
@@ -833,9 +833,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");

Modified: felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestComplexProperties.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestComplexProperties.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestComplexProperties.java (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestComplexProperties.java Mon Dec  1 09:44:13 2008
@@ -15,14 +15,14 @@
     private CheckService m_check;
     
     public void setUp() {
-       m_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), "complex");
+       m_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "complex");
        assertNotNull("Complex service availability", m_ref);
-       m_check = (CheckService) context.getService(m_ref);
+       m_check = (CheckService) getContext().getService(m_ref);
     }
     
     public void tearDown() {
         m_check = null;
-        context.ungetService(m_ref);
+        getContext().ungetService(m_ref);
     }
     
     public void testArray() {

Modified: felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestFieldProperties.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestFieldProperties.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestFieldProperties.java (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestFieldProperties.java Mon Dec  1 09:44:13 2008
@@ -36,7 +36,7 @@
     ComponentInstance instance2;
     
     public void setUp() {
-        Factory fact = Utils.getFactoryByName(context, "CONFIG-FieldConfigurableCheckService");
+        Factory fact = Utils.getFactoryByName(getContext(), "CONFIG-FieldConfigurableCheckService");
         Properties props = new Properties();
         props.put("instance.name","under-test");
         props.put("b", "1");
@@ -84,9 +84,9 @@
     }
     
     public void testConfigurationPrimitive() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -109,9 +109,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -135,9 +135,9 @@
     }
     
     public void testConfigurationPrimitiveNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -160,9 +160,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -186,9 +186,9 @@
     }
 
     public void testConfigurationPrimitiveString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -211,9 +211,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -237,9 +237,9 @@
     }
     
     public void testConfigurationPrimitiveStringNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -262,9 +262,9 @@
         
         reconfigureString(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -288,9 +288,9 @@
     }
     
     public void testConfigurationPrimitiveArrays() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -329,9 +329,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -371,9 +371,9 @@
     }
     
     public void testConfigurationPrimitiveArraysNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -396,9 +396,9 @@
    
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -438,9 +438,9 @@
     }
 
     public void testConfigurationPrimitiveArraysString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -479,9 +479,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -521,9 +521,9 @@
     }
     
     public void testConfigurationPrimitiveArraysStringNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -546,9 +546,9 @@
         
         reconfigureString(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -588,9 +588,9 @@
     }
     
     public void testConfigurationObj() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -603,9 +603,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -618,9 +618,9 @@
     }
     
     public void testConfigurationObjNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -631,9 +631,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -646,9 +646,9 @@
     }
 
     public void testConfigurationObjString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -661,9 +661,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -676,9 +676,9 @@
     }
     
     public void testConfigurationObjStringNoValue() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -689,9 +689,9 @@
         
         reconfigureString(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");

Modified: felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestMethodProperties.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestMethodProperties.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestMethodProperties.java (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestMethodProperties.java Mon Dec  1 09:44:13 2008
@@ -36,7 +36,7 @@
     ComponentInstance instance3;
 
     public void setUp() {
-        Factory fact = Utils.getFactoryByName(context, "CONFIG-MethodConfigurableCheckService");
+        Factory fact = Utils.getFactoryByName(getContext(), "CONFIG-MethodConfigurableCheckService");
         Properties props = new Properties();
         props.put("instance.name","under-test");
         props.put("b", "1");
@@ -112,9 +112,9 @@
     }
     
     public void testConfigurationPrimitive() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -155,9 +155,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -199,9 +199,9 @@
     }
 
     public void testConfigurationPrimitiveString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -242,9 +242,9 @@
 //        
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -286,9 +286,9 @@
     }
     
     public void testConfigurationPrimitiveArrays() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -345,9 +345,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -405,9 +405,9 @@
     }
 
     public void testConfigurationPrimitiveArraysString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -464,9 +464,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -524,9 +524,9 @@
     }
     
     public void testConfigurationObj() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -545,9 +545,9 @@
         
         reconfigure(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -566,9 +566,9 @@
     }
 
     public void testConfigurationObjString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -587,9 +587,9 @@
         
         reconfigureString(instance);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -608,9 +608,9 @@
     }
     
     public void testConfigurationPrimitive2() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -651,9 +651,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -695,9 +695,9 @@
     }
 
     public void testConfigurationPrimitive2String() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -738,9 +738,9 @@
         
         reconfigureString(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -782,9 +782,9 @@
     }
     
     public void testConfigurationPrimitiveArrays2() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -841,9 +841,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -901,9 +901,9 @@
     }
 
     public void testConfigurationPrimitiveArrays2String() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -960,9 +960,9 @@
         
         reconfigureString(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -1020,9 +1020,9 @@
     }
 
     public void testConfigurationObj2() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -1041,9 +1041,9 @@
         
         reconfigure(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -1062,9 +1062,9 @@
     }
 
     public void testConfigurationObj2String() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -1083,9 +1083,9 @@
         
         reconfigureString(instance2);
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance2.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -1152,9 +1152,9 @@
     }
 
     public void testConfigurationPrimitiveNoValue() {
-            ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            CheckService check = (CheckService) context.getService(ref);
+            CheckService check = (CheckService) getContext().getService(ref);
             Properties props = check.getProps();
             
             Byte b = (Byte) props.get("b");
@@ -1195,9 +1195,9 @@
             
             reconfigure(instance3);
             
-            ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            check = (CheckService) context.getService(ref);
+            check = (CheckService) getContext().getService(ref);
             props = check.getProps();
             
             b = (Byte) props.get("b");
@@ -1239,9 +1239,9 @@
         }
 
     public void testConfigurationPrimitiveStringNoValue() {
-            ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            CheckService check = (CheckService) context.getService(ref);
+            CheckService check = (CheckService) getContext().getService(ref);
             Properties props = check.getProps();
             
             Byte b = (Byte) props.get("b");
@@ -1282,9 +1282,9 @@
             
             reconfigureString(instance3);
             
-            ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            check = (CheckService) context.getService(ref);
+            check = (CheckService) getContext().getService(ref);
             props = check.getProps();
             
             b = (Byte) props.get("b");
@@ -1326,9 +1326,9 @@
         }
 
     public void testConfigurationPrimitiveArraysNoValue() {
-            ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            CheckService check = (CheckService) context.getService(ref);
+            CheckService check = (CheckService) getContext().getService(ref);
             Properties props = check.getProps();
  
                     
@@ -1370,9 +1370,9 @@
             
             reconfigure(instance3);
             
-            ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            check = (CheckService) context.getService(ref);
+            check = (CheckService) getContext().getService(ref);
             props = check.getProps();
             
             b = (byte[]) props.get("bs");
@@ -1430,9 +1430,9 @@
         }
 
     public void testConfigurationPrimitiveArraysStringNoValue() {
-            ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            CheckService check = (CheckService) context.getService(ref);
+            CheckService check = (CheckService) getContext().getService(ref);
             Properties props = check.getProps();
             
             byte[] b = (byte[]) props.get("bs");
@@ -1474,9 +1474,9 @@
     
             reconfigureString(instance3);
             
-            ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            check = (CheckService) context.getService(ref);
+            check = (CheckService) getContext().getService(ref);
             props = check.getProps();
             
             b = (byte[]) props.get("bs");
@@ -1534,9 +1534,9 @@
         }
 
     public void testConfigurationObjNoValue() {
-            ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            CheckService check = (CheckService) context.getService(ref);
+            CheckService check = (CheckService) getContext().getService(ref);
             Properties props = check.getProps();
             
             String s = (String) props.get("string");
@@ -1554,9 +1554,9 @@
             
             reconfigure(instance3);
             
-            ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            check = (CheckService) context.getService(ref);
+            check = (CheckService) getContext().getService(ref);
             props = check.getProps();
             
             s = (String) props.get("string");
@@ -1575,9 +1575,9 @@
         }
 
     public void testConfigurationObjStringNoValue() {
-            ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            CheckService check = (CheckService) context.getService(ref);
+            CheckService check = (CheckService) getContext().getService(ref);
             Properties props = check.getProps();
             
             String s = (String) props.get("string");
@@ -1595,9 +1595,9 @@
             
             reconfigureString(instance3);
             
-            ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance3.getInstanceName());
+            ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance3.getInstanceName());
             assertNotNull("Test check service availability", ref);
-            check = (CheckService) context.getService(ref);
+            check = (CheckService) getContext().getService(ref);
             props = check.getProps();
             
             s = (String) props.get("string");

Modified: felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestPropertyModifier.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestPropertyModifier.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestPropertyModifier.java (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestPropertyModifier.java Mon Dec  1 09:44:13 2008
@@ -14,7 +14,7 @@
     
     public void testPropertyModifier() {
         ComponentInstance ci = null; 
-        Factory factory =  Utils.getFactoryByName(context, "org.apache.felix.ipojo.test.scenarios.component.PropertyModifier");
+        Factory factory =  Utils.getFactoryByName(getContext(), "org.apache.felix.ipojo.test.scenarios.component.PropertyModifier");
         Properties props = new Properties();
         props.put("cls", new String[] {FooService.class.getName()});
         try {
@@ -23,18 +23,18 @@
             fail(e.getMessage());
         } 
         
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), ci.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), ci.getInstanceName());
         assertNotNull("Check ref", ref);
         
         // Check the service property
         // Not exposed here:
         assertNull("Classes -0", ref.getProperty("classes"));
         
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         assertTrue(check.check());
         
         // Property exposed now.
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), ci.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), ci.getInstanceName());
         Class[] str = (Class[]) ref.getProperty("classes");
         assertEquals("Classes size", 1, str.length);
         assertEquals("Classes[0]", FooService.class.getName(), str[0].getName());
@@ -53,7 +53,7 @@
         } 
         
         // Check the service property
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), ci.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), ci.getInstanceName());
         assertNotNull("Check ref", ref);
         str = (Class[]) ref.getProperty("classes");
         assertEquals("Classes size -3", 2, str.length);
@@ -61,7 +61,7 @@
         assertEquals("Classes[1] -3", CheckService.class.getName(), str[1].getName());
 
         
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         p = check.getProps();
         str2 = (Class[]) p.get("classes");
         assertEquals("Classes size -4", 2, str2.length);
@@ -69,7 +69,7 @@
         assertEquals("Classes[1] -4", CheckService.class.getName(), str2[1].getName());
         
         ci.dispose();
-        context.ungetService(ref);
+        getContext().ungetService(ref);
         
     }
 

Modified: felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestSuperMethodProperties.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestSuperMethodProperties.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestSuperMethodProperties.java (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/TestSuperMethodProperties.java Mon Dec  1 09:44:13 2008
@@ -32,7 +32,7 @@
     ComponentInstance instance;
 
     public void setUp() {
-        Factory fact = Utils.getFactoryByName(context, "CONFIG-ParentMethodConfigurableCheckService");
+        Factory fact = Utils.getFactoryByName(getContext(), "CONFIG-ParentMethodConfigurableCheckService");
         Properties props = new Properties();
         props.put("instance.name","under-test");
         props.put("b", "1");
@@ -69,9 +69,9 @@
     }
     
     public void testConfigurationPrimitive() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -112,9 +112,9 @@
         
         reconfigure();
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -156,9 +156,9 @@
     }
 
     public void testConfigurationPrimitiveString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         Byte b = (Byte) props.get("b");
@@ -199,9 +199,9 @@
         
         reconfigureString();
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (Byte) props.get("b");
@@ -243,9 +243,9 @@
     }
     
     public void testConfigurationPrimitiveArrays() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -302,9 +302,9 @@
         
         reconfigure();
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -362,9 +362,9 @@
     }
 
     public void testConfigurationPrimitiveArraysString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         byte[] b = (byte[]) props.get("bs");
@@ -421,9 +421,9 @@
         
         reconfigureString();
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         b = (byte[]) props.get("bs");
@@ -481,9 +481,9 @@
     }
     
     public void testConfigurationObj() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -502,9 +502,9 @@
         
         reconfigure();
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");
@@ -523,9 +523,9 @@
     }
 
     public void testConfigurationObjString() {
-        ServiceReference ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) context.getService(ref);
+        CheckService check = (CheckService) getContext().getService(ref);
         Properties props = check.getProps();
         
         String s = (String) props.get("string");
@@ -544,9 +544,9 @@
         
         reconfigureString();
         
-        ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance.getInstanceName());
+        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) context.getService(ref);
+        check = (CheckService) getContext().getService(ref);
         props = check.getProps();
         
         s = (String) props.get("string");

Modified: felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java (original)
+++ felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java Mon Dec  1 09:44:13 2008
@@ -50,7 +50,7 @@
         if (bc ==null) {
             throw new RuntimeException("Injected bundle context null");
         }
-            m_context = bc;
+        m_context = bc;
     }
 
 	public boolean foo() {

Modified: felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/HandlerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/HandlerTest.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/HandlerTest.java (original)
+++ felix/trunk/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/HandlerTest.java Mon Dec  1 09:44:13 2008
@@ -42,7 +42,7 @@
 		p.put("b", "b");
 		p.put("c", "c");
 		props.put("csh.map", p);
-		instance = Utils.getComponentInstance(context, "HANDLER-HandlerTester", props);
+		instance = Utils.getComponentInstance(getContext(), "HANDLER-HandlerTester", props);
 	}
 	
 	public void tearDown() {
@@ -57,13 +57,13 @@
 		ServiceReference[] refs = null;
         String filter = "("+"instance.name"+"="+name+")";
         try {
-            refs = context.getServiceReferences(CheckService.class.getName(), filter);
+            refs = getContext().getServiceReferences(CheckService.class.getName(), filter);
         } catch (InvalidSyntaxException e) { System.err.println("Invalid Filter : " + filter);}
         if(refs != null) { sr = refs[0]; }
         
 		assertNotNull("Check the check service availability", sr);
 		
-		CheckService cs = (CheckService) context.getService(sr);
+		CheckService cs = (CheckService) getContext().getService(sr);
 		Properties p = cs.getProps();
 		assertEquals("Assert 'simple' equality", p.get("Simple"), "simple");
 		assertEquals("Assert 'a' equality", p.get("Map1"), "a");
@@ -71,7 +71,7 @@
 		assertEquals("Assert 'c' equality", p.get("Map3"), "c");
 		
 		cs = null;
-		context.ungetService(sr);
+		getContext().ungetService(sr);
 	}
 	
 	public void testConfiguration2() {
@@ -81,12 +81,12 @@
         ServiceReference[] refs = null;
         String filter = "("+"instance.name"+"="+name+")";
         try {
-            refs = context.getServiceReferences(CheckService.class.getName(), filter);
+            refs = getContext().getServiceReferences(CheckService.class.getName(), filter);
         } catch (InvalidSyntaxException e) { System.err.println("Invalid Filter : " + filter);}
         if(refs != null) { sr = refs[0]; }
 		assertNotNull("Check the check service availability", sr);
 		
-		CheckService cs = (CheckService) context.getService(sr);
+		CheckService cs = (CheckService) getContext().getService(sr);
 		Properties p = cs.getProps();
 		assertEquals("Assert 'simple' equality", p.get("Simple"), "Simple");
 		assertEquals("Assert 'a' equality", p.get("Map1"), "a");
@@ -94,7 +94,7 @@
 		assertEquals("Assert 'c' equality", p.get("Map3"), "c");
 		
 		cs = null;
-		context.ungetService(sr);
+		getContext().ungetService(sr);
 	}
 	
 
@@ -105,18 +105,18 @@
         ServiceReference[] refs = null;
         String filter = "("+"instance.name"+"="+name+")";
         try {
-            refs = context.getServiceReferences(CheckService.class.getName(), filter);
+            refs = getContext().getServiceReferences(CheckService.class.getName(), filter);
         } catch (InvalidSyntaxException e) { System.err.println("Invalid Filter : " + filter);}
         if(refs != null) { sr = refs[0]; }
         assertNotNull("Check the check service availability", sr);
         
-        CheckService cs = (CheckService) context.getService(sr);
+        CheckService cs = (CheckService) getContext().getService(sr);
         Properties p = cs.getProps();
         assertEquals("Assert 'simple' equality", p.get("Simple"), "Simple");
         assertEquals("Size of p", 3, p.size()); // instance name, simple and changes.
         
         cs = null;
-        context.ungetService(sr);
+        getContext().ungetService(sr);
     }
 	
 	public void testLifecycle() {
@@ -126,17 +126,17 @@
         ServiceReference[] refs = null;
         String filter = "("+"instance.name"+"="+name+")";
         try {
-            refs = context.getServiceReferences(CheckService.class.getName(), filter);
+            refs = getContext().getServiceReferences(CheckService.class.getName(), filter);
         } catch (InvalidSyntaxException e) { System.err.println("Invalid Filter : " + filter);}
         if(refs != null) { sr = refs[0]; }
 		assertNotNull("Check the check service availability", sr);
 		
-		ServiceReference sr_arch = Utils.getServiceReferenceByName(context, Architecture.class.getName(), "HandlerTest-1");
-		Architecture arch = (Architecture) context.getService(sr_arch);
+		ServiceReference sr_arch = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), "HandlerTest-1");
+		Architecture arch = (Architecture) getContext().getService(sr_arch);
 		
 		assertEquals("Check instance validity - 0", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
 		
-		CheckService cs = (CheckService) context.getService(sr);
+		CheckService cs = (CheckService) getContext().getService(sr);
 		Properties p = cs.getProps();
 		Integer changes = (Integer) p.get("changes");
 		assertNotNull("Check changes no null", changes);
@@ -160,8 +160,8 @@
 		
 		cs = null;
 		arch = null;
-		context.ungetService(sr_arch);
-		context.ungetService(sr);
+		getContext().ungetService(sr_arch);
+		getContext().ungetService(sr);
 	}
 	
 	public void testAvailability() {
@@ -170,23 +170,23 @@
         ServiceReference[] refs = null;
         String filter = "("+"instance.name"+"="+name+")";
         try {
-            refs = context.getServiceReferences(CheckService.class.getName(), filter);
+            refs = getContext().getServiceReferences(CheckService.class.getName(), filter);
         } catch (InvalidSyntaxException e) { System.err.println("Invalid Filter : " + filter);}
         if(refs != null) { sr = refs[0]; }
         assertNotNull("Check the check service availability", sr);
         
-        ServiceReference sr_arch = Utils.getServiceReferenceByName(context, Architecture.class.getName(), "HandlerTest-1");
-        Architecture arch = (Architecture) context.getService(sr_arch);
+        ServiceReference sr_arch = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), "HandlerTest-1");
+        Architecture arch = (Architecture) getContext().getService(sr_arch);
         assertEquals("Check validity", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
         
         // Kill the handler factory
-        HandlerManagerFactory f = (HandlerManagerFactory) Utils.getHandlerFactoryByName(context, "check");
+        HandlerManagerFactory f = (HandlerManagerFactory) Utils.getHandlerFactoryByName(getContext(), "check");
         f.stop();
         
-        sr = Utils.getServiceReferenceByName(context, CheckService.class.getName(), "HandlerTest-1");
+        sr = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "HandlerTest-1");
         assertNull("Check the check service unavailability", sr);
         
-        sr_arch = Utils.getServiceReferenceByName(context, Architecture.class.getName(), "HandlerTest-1");
+        sr_arch = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), "HandlerTest-1");
         assertNull("Check the architecture unavailability", sr_arch);
         
         // The instance is disposed, restart the handler
@@ -200,13 +200,13 @@
         p.put("b", "b");
         p.put("c", "c");
         props.put("csh.map", p);
-        instance = Utils.getComponentInstance(context, "HANDLER-HandlerTester", props);
+        instance = Utils.getComponentInstance(getContext(), "HANDLER-HandlerTester", props);
         
-        sr = Utils.getServiceReferenceByName(context, CheckService.class.getName(), "HandlerTest-1");
+        sr = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "HandlerTest-1");
         assertNotNull("Check the check service availability - 2", sr);
         
-        sr_arch = Utils.getServiceReferenceByName(context, Architecture.class.getName(), "HandlerTest-1");
-        arch = (Architecture) context.getService(sr_arch);
+        sr_arch = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), "HandlerTest-1");
+        arch = (Architecture) getContext().getService(sr_arch);
         assertEquals("Check validity - 2", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
 	}
 

Modified: felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java (original)
+++ felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java Mon Dec  1 09:44:13 2008
@@ -50,7 +50,7 @@
         if (bc ==null) {
             throw new RuntimeException("Injected bundle context null");
         }
-            m_context = bc;
+        m_context = bc;
     }
 
 	public boolean foo() {

Modified: felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ComponentDesc.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ComponentDesc.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ComponentDesc.java (original)
+++ felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ComponentDesc.java Mon Dec  1 09:44:13 2008
@@ -54,21 +54,21 @@
 //	Factory multiple_optional;
 	
 	public void setUp() {
-		sr_fooProvider1 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooProviderType-1");
-		sr_fooProvider2 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooProviderType-2");
-		sr_fooProviderDyn2 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooProviderType-Dyn2");
-		sr_fooProvider3 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooProviderType-3");
-		sr_foobarProvider = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooBarProviderType-1");
+		sr_fooProvider1 = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooProviderType-1");
+		sr_fooProvider2 = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooProviderType-2");
+		sr_fooProviderDyn2 = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooProviderType-Dyn2");
+		sr_fooProvider3 = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooProviderType-3");
+		sr_foobarProvider = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooBarProviderType-1");
 //		sr_simple = Utils.getServiceReferenceByName(context, Factory.class.getName(), "SimpleCheckServiceProvider");
 //		sr_optional = Utils.getServiceReferenceByName(context, Factory.class.getName(), "SimpleOptionalCheckServiceProvider");
 //		sr_multiple = Utils.getServiceReferenceByName(context, Factory.class.getName(), "SimpleMultipleCheckServiceProvider");
 //		sr_multiple_optional = Utils.getServiceReferenceByName(context, Factory.class.getName(), "SimpleOptionalMultipleCheckServiceProvider");
 		
-		fooProvider1 = (Factory) context.getService(sr_fooProvider1);
-		fooProvider2 = (Factory) context.getService(sr_fooProvider2);
-		fooProviderDyn2 = (Factory) context.getService(sr_fooProviderDyn2);
-		fooProvider3 = (Factory) context.getService(sr_fooProvider3);
-		foobarProvider = (Factory) context.getService(sr_foobarProvider);
+		fooProvider1 = (Factory) getContext().getService(sr_fooProvider1);
+		fooProvider2 = (Factory) getContext().getService(sr_fooProvider2);
+		fooProviderDyn2 = (Factory) getContext().getService(sr_fooProviderDyn2);
+		fooProvider3 = (Factory) getContext().getService(sr_fooProvider3);
+		foobarProvider = (Factory) getContext().getService(sr_foobarProvider);
 //		simple = (Factory) context.getService(sr_simple);
 //		optional = (Factory) context.getService(sr_optional);
 //		multiple = (Factory) context.getService(sr_multiple);
@@ -87,11 +87,11 @@
 //		optional = null;
 //		multiple_optional = null;
 		
-		context.ungetService(sr_fooProvider1);
-		context.ungetService(sr_fooProvider2);
-		context.ungetService(sr_fooProviderDyn2);
-		context.ungetService(sr_fooProvider3);
-		context.ungetService(sr_foobarProvider);
+		getContext().ungetService(sr_fooProvider1);
+		getContext().ungetService(sr_fooProvider2);
+		getContext().ungetService(sr_fooProviderDyn2);
+		getContext().ungetService(sr_fooProvider3);
+		getContext().ungetService(sr_foobarProvider);
 //		context.ungetService(sr_simple);
 //		context.ungetService(sr_optional);
 //		context.ungetService(sr_multiple);

Modified: felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ConfigAdminTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ConfigAdminTest.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ConfigAdminTest.java (original)
+++ felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/ConfigAdminTest.java Mon Dec  1 09:44:13 2008
@@ -36,9 +36,9 @@
 	private ManagedServiceFactory getFactoryByName(String pid) {
 		ServiceReference[] refs;
 		try {
-			refs = context.getServiceReferences(ManagedServiceFactory.class.getName(), "(service.pid="+pid+")");
+			refs = getContext().getServiceReferences(ManagedServiceFactory.class.getName(), "(service.pid="+pid+")");
 			if(refs == null) { return null; }
-			return ((org.osgi.service.cm.ManagedServiceFactory) context.getService(refs[0]));
+			return ((org.osgi.service.cm.ManagedServiceFactory) getContext().getService(refs[0]));
 		} catch (InvalidSyntaxException e) {
 			System.err.println("Cannot get the factory " + pid + " : " + e.getMessage());
 			return null;
@@ -60,10 +60,10 @@
 		
 		try {
 			f.updated("ok2", p);
-			ServiceReference ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "ok2");
+			ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
 			assertNotNull("Check instance creation", ref);
 			f.deleted("ok2");
-			ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "ok2");
+			ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
 			assertNull("Check instance deletion", ref);
 		} catch (ConfigurationException e) {
 			fail("An acceptable configuration is rejected : " + e.getMessage());
@@ -85,10 +85,10 @@
         
         try {
             f.updated("ok2", p);
-            ServiceReference ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "ok2");
+            ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
             assertNotNull("Check instance creation", ref);
             f.deleted("ok2");
-            ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "ok2");
+            ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "ok2");
             assertNull("Check instance deletion", ref);
         } catch (ConfigurationException e) {
             fail("An acceptable configuration is rejected : " + e.getMessage());
@@ -110,15 +110,15 @@
 		
 		try {
 			f.updated("okkkk", p);
-			ServiceReference ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "okkkk");
+			ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
 			assertNotNull("Check instance creation", ref);
 			p.put("int", new Integer("4"));
 			f.updated("okkkk", p);
-			ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "okkkk");
+			ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
 			Integer test = (Integer) ref.getProperty("int");
 			assertEquals("Check instance modification", 4, test.intValue());
 			f.deleted("okkkk");
-			ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "okkkk");
+			ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
 			assertNull("Check instance deletion", ref);
 		} catch (ConfigurationException e) {
 			fail("An acceptable configuration is rejected : " + e.getMessage());
@@ -141,15 +141,15 @@
     	
     	try {
     		f.updated("okkkk", p);
-    		ServiceReference ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "okkkk");
+    		ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
     		assertNotNull("Check instance creation", ref);
     		p.put("int", new Integer("4"));
     		f.updated("okkkk", p);
-    		ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "okkkk");
+    		ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
     		Integer test = (Integer) ref.getProperty("int");
     		assertEquals("Check instance modification", 4, test.intValue());
     		f.deleted("okkkk");
-    		ref = Utils.getServiceReferenceByName(context, FooService.class.getName(), "okkkk");
+    		ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), "okkkk");
     		assertNull("Check instance deletion", ref);
     	} catch (ConfigurationException e) {
     		fail("An acceptable configuration is rejected : " + e.getMessage());

Modified: felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/FactoryProps.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/FactoryProps.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/FactoryProps.java (original)
+++ felix/trunk/ipojo/tests/core/factories/src/main/java/org/apache/felix/ipojo/test/scenarios/factories/FactoryProps.java Mon Dec  1 09:44:13 2008
@@ -36,7 +36,7 @@
 //	}
 	
 	public void testSimpleExposition() {
-		ServiceReference ref1 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooProviderType-1");
+		ServiceReference ref1 = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooProviderType-1");
 		assertNotNull("The factory is available", ref1);
 		String[] spec = (String[]) ref1.getProperty("component.providedServiceSpecifications");
 		assertEquals("Check array length", spec.length, 1);
@@ -44,7 +44,7 @@
 	}
 	
 	public void testDoubleExposition() {
-		ServiceReference ref1 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooBarProviderType-1");
+		ServiceReference ref1 = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooBarProviderType-1");
 		assertNotNull("The factory is available", ref1);
 		String[] spec = (String[]) ref1.getProperty("component.providedServiceSpecifications");
 		assertEquals("Check array length", spec.length, 2);
@@ -53,7 +53,7 @@
 	}
 	
 	public void testProps() {
-		ServiceReference ref1 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooProviderType-Dyn2");
+		ServiceReference ref1 = Utils.getServiceReferenceByName(getContext(), Factory.class.getName(), "Factories-FooProviderType-Dyn2");
 		assertNotNull("The factory is available", ref1);
 		PropertyDescription[] pd = (PropertyDescription[]) ref1.getProperty("component.properties");
 		assertEquals("Check property list size", pd.length, 5);



Mime
View raw message