You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2014/03/09 09:03:59 UTC
svn commit: r1575671 [6/9] - in /felix/trunk/ipojo/runtime/core-it: ./
ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/
ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/
ipojo-api-test/src/te...
Modified: felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java?rev=1575671&r1=1575670&r2=1575671&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java (original)
+++ felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java Sun Mar 9 08:03:56 2014
@@ -113,12 +113,12 @@ public class TestDelayedMultipleDependen
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -134,10 +134,10 @@ public class TestDelayedMultipleDependen
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -153,7 +153,7 @@ public class TestDelayedMultipleDependen
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.INVALID);
instance1.stop();
@@ -164,12 +164,12 @@ public class TestDelayedMultipleDependen
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -185,10 +185,10 @@ public class TestDelayedMultipleDependen
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -204,7 +204,7 @@ public class TestDelayedMultipleDependen
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.INVALID);
instance2.stop();
@@ -215,15 +215,15 @@ public class TestDelayedMultipleDependen
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -239,10 +239,10 @@ public class TestDelayedMultipleDependen
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -258,7 +258,7 @@ public class TestDelayedMultipleDependen
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
instance3.stop();
@@ -268,12 +268,12 @@ public class TestDelayedMultipleDependen
instance4.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -289,10 +289,10 @@ public class TestDelayedMultipleDependen
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -308,7 +308,7 @@ public class TestDelayedMultipleDependen
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
instance4.stop();
@@ -318,12 +318,12 @@ public class TestDelayedMultipleDependen
instance5.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -344,10 +344,10 @@ public class TestDelayedMultipleDependen
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -367,7 +367,7 @@ public class TestDelayedMultipleDependen
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -381,12 +381,12 @@ public class TestDelayedMultipleDependen
instance6.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -407,10 +407,10 @@ public class TestDelayedMultipleDependen
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -430,7 +430,7 @@ public class TestDelayedMultipleDependen
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -444,12 +444,12 @@ public class TestDelayedMultipleDependen
instance7.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -470,10 +470,10 @@ public class TestDelayedMultipleDependen
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -493,7 +493,7 @@ public class TestDelayedMultipleDependen
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
id = null;
Modified: felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java?rev=1575671&r1=1575670&r2=1575671&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java (original)
+++ felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java Sun Mar 9 08:03:56 2014
@@ -110,24 +110,24 @@ public class TestDelayedSimpleDependenci
instance1.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
fooProvider.start();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
id = null;
cs = null;
@@ -140,12 +140,12 @@ public class TestDelayedSimpleDependenci
instance2.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -160,7 +160,7 @@ public class TestDelayedSimpleDependenci
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -175,13 +175,13 @@ public class TestDelayedSimpleDependenci
instance3.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -196,7 +196,7 @@ public class TestDelayedSimpleDependenci
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -211,14 +211,14 @@ public class TestDelayedSimpleDependenci
instance4.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -233,7 +233,7 @@ public class TestDelayedSimpleDependenci
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -248,14 +248,14 @@ public class TestDelayedSimpleDependenci
instance5.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -275,7 +275,7 @@ public class TestDelayedSimpleDependenci
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -290,14 +290,14 @@ public class TestDelayedSimpleDependenci
instance6.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -317,7 +317,7 @@ public class TestDelayedSimpleDependenci
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -332,14 +332,14 @@ public class TestDelayedSimpleDependenci
instance7.start();
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -359,7 +359,7 @@ public class TestDelayedSimpleDependenci
fooProvider.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
id = null;
Modified: felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java?rev=1575671&r1=1575670&r2=1575671&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java (original)
+++ felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java Sun Mar 9 08:03:56 2014
@@ -127,7 +127,7 @@ public class TestDependencyArchitecture
public void testSimpleDependency() {
ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
assertNotNull("Check architecture availability", arch_dep);
- PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
// Check dependency handler invalidity
@@ -146,10 +146,10 @@ public class TestDependencyArchitecture
ServiceReference arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps);
- PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -157,30 +157,30 @@ public class TestDependencyArchitecture
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
ProvidedServiceHandlerDescription psh = getPSDesc(id_ps);
assertEquals("Check POJO creation", id_ps.getCreatedObjects().length, 1);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
dhd = getDependencyDesc(id_dep);
assertFalse("Check dependency handler invalidity", dhd.isValid());
fooProvider1.start();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
psh = getPSDesc(id_ps);
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -190,19 +190,19 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
psh = getPSDesc(id_ps);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
dhd = getDependencyDesc(id_dep);
assertFalse("Check dependency handler invalidity", dhd.isValid());
@@ -217,7 +217,7 @@ public class TestDependencyArchitecture
public void testProxiedSimpleDependency() {
ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
assertNotNull("Check architecture availability", arch_dep);
- PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
// Check dependency handler invalidity
@@ -236,10 +236,10 @@ public class TestDependencyArchitecture
ServiceReference arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps);
- PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -247,30 +247,30 @@ public class TestDependencyArchitecture
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
ProvidedServiceHandlerDescription psh = getPSDesc(id_ps);
assertEquals("Check POJO creation", id_ps.getCreatedObjects().length, 1);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
dhd = getDependencyDesc(id_dep);
assertFalse("Check dependency handler invalidity", dhd.isValid());
fooProvider1.start();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
psh = getPSDesc(id_ps);
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -280,18 +280,18 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
psh = getPSDesc(id_ps);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
dhd = getDependencyDesc(id_dep);
assertFalse("Check dependency handler invalidity", dhd.isValid());
@@ -306,7 +306,7 @@ public class TestDependencyArchitecture
public void testOptionalDependency() {
ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
assertNotNull("Check architecture availability", arch_dep);
- PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.VALID);
// Check dependency handler invalidity
@@ -324,10 +324,10 @@ public class TestDependencyArchitecture
ServiceReference arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps);
- PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -335,30 +335,30 @@ public class TestDependencyArchitecture
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
ProvidedServiceHandlerDescription psh = getPSDesc(id_ps);
assertEquals("Check POJO creation", id_ps.getCreatedObjects().length, 1);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler invalidity", dhd.isValid());
fooProvider1.start();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
psh = getPSDesc(id_ps);
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -368,18 +368,18 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+ //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
psh = getPSDesc(id_ps);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler invalidity", dhd.isValid());
@@ -394,7 +394,7 @@ public class TestDependencyArchitecture
public void testMultipleDependency() {
ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
assertNotNull("Check architecture availability", arch_dep);
- PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
// Check dependency handler invalidity
@@ -420,10 +420,10 @@ public class TestDependencyArchitecture
ServiceReference arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps1);
- PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
assertTrue("Check instance validity - 1", id_ps1.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -432,13 +432,13 @@ public class TestDependencyArchitecture
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
ProvidedServiceHandlerDescription psh = getPSDesc(id_ps1);
assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
@@ -449,12 +449,12 @@ public class TestDependencyArchitecture
ServiceReference arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
assertNotNull("Check architecture availability", arch_ps1);
assertNotNull("Check architecture 2 availability", arch_ps2);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
- PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps2)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+ PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps2)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
assertTrue("Check instance 2 invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -463,14 +463,14 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
- //id_ps2 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps2 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
ProvidedServiceHandlerDescription psh1 = getPSDesc(id_ps1);
ProvidedServiceHandlerDescription psh2 = getPSDesc(id_ps2);
assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
@@ -481,10 +481,10 @@ public class TestDependencyArchitecture
arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps1);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
assertTrue("Check instance validity - 1", id_ps1.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -493,31 +493,31 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
psh = getPSDesc(id_ps1);
assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
assertEquals("Check used ref - 5 ", dhd.getDependencies()[0].getUsedServices().size(), 1);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertFalse("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertFalse("Check dependency handler invalidity", dhd.isValid());
fooProvider2.start();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
assertNotNull("Check architecture availability", arch_ps1);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
@@ -530,19 +530,19 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
psh = getPSDesc(id_ps2);
assertEquals("Check used ref - 7 ", dhd.getDependencies()[0].getUsedServices().size(), 1);
fooProvider2.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertFalse("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertFalse("Check dependency handler invalidity", dhd.isValid());
@@ -557,7 +557,7 @@ public class TestDependencyArchitecture
public void testMultipleOptionalDependency() {
ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
assertNotNull("Check architecture availability", arch_dep);
- PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.VALID);
// Check dependency handler invalidity
@@ -574,10 +574,10 @@ public class TestDependencyArchitecture
ServiceReference arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps1);
- PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -585,13 +585,13 @@ public class TestDependencyArchitecture
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
ProvidedServiceHandlerDescription psh = getPSDesc(id_ps1);
assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
@@ -602,12 +602,12 @@ public class TestDependencyArchitecture
ServiceReference arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
assertNotNull("Check architecture availability", arch_ps1);
assertNotNull("Check architecture 2 availability", arch_ps2);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
- PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps2)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+ PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps2)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
assertTrue("Check instance 2 invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -615,14 +615,14 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
- //id_ps2 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps2 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
ProvidedServiceHandlerDescription psh1 = getPSDesc(id_ps1);
ProvidedServiceHandlerDescription psh2 = getPSDesc(id_ps2);
assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
@@ -632,10 +632,10 @@ public class TestDependencyArchitecture
arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
assertNotNull("Check architecture availability", arch_ps1);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler validity", dhd.isValid());
@@ -643,30 +643,30 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
psh = getPSDesc(id_ps1);
assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
fooProvider1.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler invalidity", dhd.isValid());
fooProvider2.start();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
assertNotNull("Check architecture availability", arch_ps2);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
psh = getPSDesc(id_ps2);
assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -676,18 +676,18 @@ public class TestDependencyArchitecture
cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
assertTrue("check CheckService invocation", cs.check());
// Check object graph
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
dhd = getDependencyDesc(id_dep);
- //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+ //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
psh = getPSDesc(id_ps2);
fooProvider2.stop();
- //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+ //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
dhd = getDependencyDesc(id_dep);
assertTrue("Check dependency handler invalidity", dhd.isValid());
Modified: felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java?rev=1575671&r1=1575670&r2=1575671&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java (original)
+++ felix/trunk/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java Sun Mar 9 08:03:56 2014
@@ -77,17 +77,17 @@ public class TestListMultipleDependencie
@Test public void testSimple() {
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
fooProvider1.start();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -102,10 +102,10 @@ public class TestListMultipleDependencie
assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
fooProvider2.start();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -121,10 +121,10 @@ public class TestListMultipleDependencie
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -139,7 +139,7 @@ public class TestListMultipleDependencie
assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
id = null;
@@ -151,12 +151,12 @@ public class TestListMultipleDependencie
@Test public void testOptional() {
ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
assertNotNull("Check architecture availability", arch_ref);
- InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
assertNotNull("Check CheckService availability", cs_ref);
- CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
Properties props = cs.getProps();
//Check properties
assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -172,10 +172,10 @@ public class TestListMultipleDependencie
fooProvider1.start();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -191,10 +191,10 @@ public class TestListMultipleDependencie
fooProvider2.start();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -210,10 +210,10 @@ public class TestListMultipleDependencie
fooProvider1.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -229,10 +229,10 @@ public class TestListMultipleDependencie
fooProvider2.stop();
- id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+ id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
- cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+ cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
props = cs.getProps();
//Check properties
assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.