felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r722146 [15/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/composi...
Date Mon, 01 Dec 2008 17:44:17 GMT
Modified: felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/di/OptionalDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/di/OptionalDependencies.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/di/OptionalDependencies.java
(original)
+++ felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/di/OptionalDependencies.java
Mon Dec  1 09:44:13 2008
@@ -38,28 +38,28 @@
 		try {
 			Properties prov = new Properties();
 			prov.put("instance.name","FooProvider");
-			fooProvider = Utils.getFactoryByName(context, "FooProviderType-1").createComponentInstance(prov);
+			fooProvider = Utils.getFactoryByName(getContext(), "FooProviderType-1").createComponentInstance(prov);
 			fooProvider.stop();
 			
 			Properties i1 = new Properties();
 			i1.put("instance.name","Simple");
-			instance1 = Utils.getFactoryByName(context, "DISimpleOptionalCheckServiceProvider").createComponentInstance(i1);
+			instance1 = Utils.getFactoryByName(getContext(), "DISimpleOptionalCheckServiceProvider").createComponentInstance(i1);
 		
 			Properties i2 = new Properties();
 			i2.put("instance.name","Void");
-			instance2 = Utils.getFactoryByName(context, "DIVoidOptionalCheckServiceProvider").createComponentInstance(i2);
+			instance2 = Utils.getFactoryByName(getContext(), "DIVoidOptionalCheckServiceProvider").createComponentInstance(i2);
 		
 			Properties i3 = new Properties();
 			i3.put("instance.name","Object");
-			instance3 = Utils.getFactoryByName(context, "DIObjectOptionalCheckServiceProvider").createComponentInstance(i3);
+			instance3 = Utils.getFactoryByName(getContext(), "DIObjectOptionalCheckServiceProvider").createComponentInstance(i3);
 		
 			Properties i4 = new Properties();
 			i4.put("instance.name","Ref");
-			instance4 = Utils.getFactoryByName(context, "DIRefOptionalCheckServiceProvider").createComponentInstance(i4);
+			instance4 = Utils.getFactoryByName(getContext(), "DIRefOptionalCheckServiceProvider").createComponentInstance(i4);
 			
 			Properties i5 = new Properties();
             i5.put("instance.name","Both");
-            instance5 = Utils.getFactoryByName(context, "DIBothOptionalCheckServiceProvider").createComponentInstance(i5);
+            instance5 = Utils.getFactoryByName(getContext(), "DIBothOptionalCheckServiceProvider").createComponentInstance(i5);
 		} catch(Exception e) { fail(e.getMessage()); }		
 	}
 	
@@ -79,14 +79,14 @@
 	}
 	
 	public void testSimple() {
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(),
instance1.getInstanceName());
+		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(),
instance1.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(),
instance1.getInstanceName());
+		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(),
instance1.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) context.getService(cs_ref);
+		CheckService cs = (CheckService) getContext().getService(cs_ref);
 		Properties props = cs.getProps();
 		
 		//Check properties
@@ -104,11 +104,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) context.getService(cs_ref);
+		cs = (CheckService) getContext().getService(cs_ref);
 		props = cs.getProps();
 		
 		//Check properties
@@ -126,24 +126,24 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
 		id = null;
 		cs = null;
-		context.ungetService(arch_ref);
-		context.ungetService(cs_ref);		
+		getContext().ungetService(arch_ref);
+		getContext().ungetService(cs_ref);		
 	}
 	
 	public void testVoid() {
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(),
instance2.getInstanceName());
+		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(),
instance2.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(),
instance2.getInstanceName());
+		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(),
instance2.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) context.getService(cs_ref);
+		CheckService cs = (CheckService) getContext().getService(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 1", ((Boolean)props.get("result")).booleanValue());
// False is returned (nullable)
@@ -160,11 +160,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) context.getService(cs_ref);
+		cs = (CheckService) getContext().getService(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -181,10 +181,10 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) context.getService(cs_ref);
+		cs = (CheckService) getContext().getService(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -201,19 +201,19 @@
 		
 		id = null;
 		cs = null;
-		context.ungetService(arch_ref);
-		context.ungetService(cs_ref);	
+		getContext().ungetService(arch_ref);
+		getContext().ungetService(cs_ref);	
 	}
 	
 	public void testObject() {
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(),
instance3.getInstanceName());
+		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(),
instance3.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(),
instance3.getInstanceName());
+		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(),
instance3.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) context.getService(cs_ref);
+		CheckService cs = (CheckService) getContext().getService(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
// False is returned (nullable)
@@ -226,11 +226,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) context.getService(cs_ref);
+		cs = (CheckService) getContext().getService(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -243,10 +243,10 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) context.getService(cs_ref);
+		cs = (CheckService) getContext().getService(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -259,19 +259,19 @@
 		
 		id = null;
 		cs = null;
-		context.ungetService(arch_ref);
-		context.ungetService(cs_ref);		
+		getContext().ungetService(arch_ref);
+		getContext().ungetService(cs_ref);		
 	}
 	
 	public void testRef() {
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(),
instance4.getInstanceName());
+		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(),
instance4.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(),
instance4.getInstanceName());
+		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(),
instance4.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) context.getService(cs_ref);
+		CheckService cs = (CheckService) getContext().getService(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
// False is returned (nullable)
@@ -284,11 +284,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) context.getService(cs_ref);
+		cs = (CheckService) getContext().getService(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -301,10 +301,10 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) context.getService(cs_ref);
+		cs = (CheckService) getContext().getService(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -317,19 +317,19 @@
 		
 		id = null;
 		cs = null;
-		context.ungetService(arch_ref);
-		context.ungetService(cs_ref);
+		getContext().ungetService(arch_ref);
+		getContext().ungetService(cs_ref);
 	}
 	
 	public void testBoth() {
-        ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(),
instance5.getInstanceName());
+        ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(),
instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
         
-        ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(),
instance5.getInstanceName());
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(),
instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) context.getService(cs_ref);
+        CheckService cs = (CheckService) getContext().getService(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
// False is returned (nullable)
@@ -342,11 +342,11 @@
         
         fooProvider.start();
         
-        id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
         
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) context.getService(cs_ref);
+        cs = (CheckService) getContext().getService(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -361,10 +361,10 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
         
-        cs = (CheckService) context.getService(cs_ref);
+        cs = (CheckService) getContext().getService(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -379,8 +379,8 @@
   
         id = null;
         cs = null;
-        context.ungetService(arch_ref);
-        context.ungetService(cs_ref);
+        getContext().ungetService(arch_ref);
+        getContext().ungetService(cs_ref);
     }
 
 

Modified: felix/trunk/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-providing/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/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
(original)
+++ felix/trunk/ipojo/tests/core/service-providing/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/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/BadTests.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/BadTests.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/BadTests.java
(original)
+++ felix/trunk/ipojo/tests/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/BadTests.java
Mon Dec  1 09:44:13 2008
@@ -147,12 +147,12 @@
      * 
      */
     public void setUp() {
-    	m_utils = new EahTestUtils(context);
+    	m_utils = new EahTestUtils(getContext());
         /**
          * Get the list of available components.
          */
         try {
-            String header = (String) context.getBundle().getHeaders().get(
+            String header = (String) getContext().getBundle().getHeaders().get(
                     "iPOJO-Components");
             m_components = ManifestMetadataParser.parseHeaderMetadata(header)
                     .getElements("component");
@@ -279,21 +279,21 @@
         Dictionary properties = new Hashtable();
 
         // Provider
-        ComponentFactory providerFactory = new ComponentFactory(context,
+        ComponentFactory providerFactory = new ComponentFactory(getContext(),
                 m_provider);
         providerFactory.start();
         properties.put("instance.name","Emperor of donuts");
         ComponentInstance providerInstance = providerFactory
                 .createComponentInstance(properties);
         ServiceReference providerService = IPojoTestUtils
-                .getServiceReferenceByName(context, DonutProvider.class
+                .getServiceReferenceByName(getContext(), DonutProvider.class
                         .getName(), providerInstance.getInstanceName());
-        DonutProvider provider = (DonutProvider) context
+        DonutProvider provider = (DonutProvider) getContext()
                 .getService(providerService);
 
         // The consumer
         properties = new Hashtable();
-        ComponentFactory consumerFactory = new ComponentFactory(context,
+        ComponentFactory consumerFactory = new ComponentFactory(getContext(),
                 m_consumer);
         consumerFactory.start();
         properties.put("instance.name","Homer Simpson");
@@ -301,9 +301,9 @@
         ComponentInstance consumerInstance = consumerFactory
                 .createComponentInstance(properties);
         ServiceReference consumerService = IPojoTestUtils
-                .getServiceReferenceByName(context, DonutConsumer.class
+                .getServiceReferenceByName(getContext(), DonutConsumer.class
                         .getName(), consumerInstance.getInstanceName());
-        DonutConsumer consumer = (DonutConsumer) context
+        DonutConsumer consumer = (DonutConsumer) getContext()
                 .getService(consumerService);
 
         /**
@@ -318,9 +318,9 @@
         /**
          * Destroy component's instances.
          */
-        context.ungetService(providerService);
+        getContext().ungetService(providerService);
         providerInstance.dispose();
-        context.ungetService(consumerService);
+        getContext().ungetService(consumerService);
         consumerInstance.dispose();
         providerFactory.stop();
         consumerFactory.stop();
@@ -344,7 +344,7 @@
         m_publisher.removeAttribute(m_publisherName);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         try {
             fact.start();
             // Should not be executed
@@ -376,7 +376,7 @@
         m_publisher.removeAttribute(m_publisherField);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         try {
             fact.start();
             // Should not be executed
@@ -411,7 +411,7 @@
         m_publisher.addAttribute(unexistingField);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         try {
             fact.start();
             // Should not be executed
@@ -447,7 +447,7 @@
         m_publisher.addAttribute(badTypedField);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         try {
             fact.start();
             // Should not be executed
@@ -478,7 +478,7 @@
 
         // Remove the topics attribute of the publisher
         m_publisher.removeAttribute(m_publisherTopics);
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         fact.start();
 
         // Try to create an instance without specified topics
@@ -522,7 +522,7 @@
         m_publisher.addAttribute(malformedTopics);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         try {
             fact.start();
             // Should not be executed
@@ -559,7 +559,7 @@
         m_publisher.addAttribute(malformedTopics);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         try {
             fact.start();
             // Should not be executed
@@ -591,7 +591,7 @@
         // Remove the topics attribute of the publisher and replace with a
         // malformed one
         m_publisher.removeAttribute(m_publisherTopics);
-        ComponentFactory fact = new ComponentFactory(context, m_provider);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_provider);
         fact.start();
 
         // Try to create an instance with malformed specified topics
@@ -634,7 +634,7 @@
         m_subscriber.removeAttribute(m_subscriberName);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_consumer);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
         try {
             fact.start();
             // Should not be executed
@@ -666,7 +666,7 @@
         m_subscriber.removeAttribute(m_subscriberCallback);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_consumer);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
         try {
             fact.start();
             // Should not be executed
@@ -696,7 +696,7 @@
 
         // Remove the topics attribute of the subscriber
         m_subscriber.removeAttribute(m_subscriberTopics);
-        ComponentFactory fact = new ComponentFactory(context, m_consumer);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
         fact.start();
 
         // Try to create an instance without specified topics
@@ -741,7 +741,7 @@
         m_subscriber.addAttribute(malformedTopics);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_consumer);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
         try {
             fact.start();
             // Should not be executed
@@ -773,7 +773,7 @@
         // Remove the topics attribute of the subscriber and replace with a
         // malformed one
         m_subscriber.removeAttribute(m_subscriberTopics);
-        ComponentFactory fact = new ComponentFactory(context, m_consumer);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
         fact.start();
 
         // Try to create an instance with malformed specified topics
@@ -819,7 +819,7 @@
         m_subscriber.addAttribute(unknownType);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_consumer);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
         try {
             fact.start();
             // Should not be executed
@@ -856,7 +856,7 @@
         m_subscriber.addAttribute(unknownType);
 
         // Create and try to start the factory
-        ComponentFactory fact = new ComponentFactory(context, m_consumer);
+        ComponentFactory fact = new ComponentFactory(getContext(), m_consumer);
         try {
             fact.start();
             // Should not be executed

Modified: felix/trunk/ipojo/tests/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/GoodTests.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/GoodTests.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/GoodTests.java
(original)
+++ felix/trunk/ipojo/tests/handler/eventadmin/src/main/java/org/apache/felix/ipojo/test/GoodTests.java
Mon Dec  1 09:44:13 2008
@@ -283,7 +283,7 @@
         throws UnacceptableConfiguration, MissingHandlerException,
         ConfigurationException {
 
-        m_utils = new EahTestUtils(context);
+        m_utils = new EahTestUtils(getContext());
         Dictionary properties = new Hashtable();
 
         // All the providers
@@ -336,9 +336,9 @@
         // Get all the services references
         for (int i = 0; i < NUMBER_OF_PROVIDERS; i++) {
             m_providersServices[i] = IPojoTestUtils.getServiceReferenceByName(
-                    context, DonutProvider.class.getName(),
+                    getContext(), DonutProvider.class.getName(),
                     m_providersInstances[i].getInstanceName());
-            m_providers[i] = (DonutProvider) context
+            m_providers[i] = (DonutProvider) getContext()
                     .getService(m_providersServices[i]);
         }
         m_synchronousProviders[0] = m_providers[1];
@@ -408,9 +408,9 @@
         // Get all the services references
         for (int i = 0; i < NUMBER_OF_CONSUMERS; i++) {
             m_consumersServices[i] = IPojoTestUtils.getServiceReferenceByName(
-                    context, DonutConsumer.class.getName(),
+                    getContext(), DonutConsumer.class.getName(),
                     m_consumersInstances[i].getInstanceName());
-            m_consumers[i] = (DonutConsumer) context
+            m_consumers[i] = (DonutConsumer) getContext()
                     .getService(m_consumersServices[i]);
         }
         m_quickConsumers[0] = m_consumers[0];
@@ -423,9 +423,9 @@
         m_eventTrackerInstance = m_utils.getEventTrackerFactory()
                 .createComponentInstance(properties);
         m_eventTrackerService = IPojoTestUtils.getServiceReferenceByName(
-                context, EventTracker.class.getName(), m_eventTrackerInstance
+                getContext(), EventTracker.class.getName(), m_eventTrackerInstance
                         .getInstanceName());
-        m_eventTracker = (EventTracker) context
+        m_eventTracker = (EventTracker) getContext()
                 .getService(m_eventTrackerService);
 
         // Create the filtered consumer
@@ -440,10 +440,10 @@
                     .getDonutEventConsumerFactory().createComponentInstance(
                             properties);
             m_filteredConsumersServices[i] = IPojoTestUtils
-                    .getServiceReferenceByName(context, DonutConsumer.class
+                    .getServiceReferenceByName(getContext(), DonutConsumer.class
                             .getName(), m_filteredConsumersInstances[i]
                             .getInstanceName());
-            m_filteredConsumers[i] = (DonutConsumer) context
+            m_filteredConsumers[i] = (DonutConsumer) getContext()
                     .getService(m_filteredConsumersServices[i]);
         }
 
@@ -461,10 +461,10 @@
                     .getSynchronousDonutProviderFactory()
                     .createComponentInstance(properties);
             m_topicsProvidersServices[i] = IPojoTestUtils
-                    .getServiceReferenceByName(context, DonutProvider.class
+                    .getServiceReferenceByName(getContext(), DonutProvider.class
                             .getName(), m_topicsProvidersInstances[i]
                             .getInstanceName());
-            m_topicsProviders[i] = (DonutProvider) context
+            m_topicsProviders[i] = (DonutProvider) getContext()
                     .getService(m_topicsProvidersServices[i]);
 
             // Create consumer
@@ -476,10 +476,10 @@
             m_topicsConsumersInstances[i] = m_utils.getDonutConsumerFactory()
                     .createComponentInstance(properties);
             m_topicsConsumersServices[i] = IPojoTestUtils
-                    .getServiceReferenceByName(context, DonutConsumer.class
+                    .getServiceReferenceByName(getContext(), DonutConsumer.class
                             .getName(), m_topicsConsumersInstances[i]
                             .getInstanceName());
-            m_topicsConsumers[i] = (DonutConsumer) context
+            m_topicsConsumers[i] = (DonutConsumer) getContext()
                     .getService(m_topicsConsumersServices[i]);
             topics.remove("donut-subscriber");
         }
@@ -721,23 +721,23 @@
     public void tearDown() {
         int index;
         for (index = 0; index < NUMBER_OF_PROVIDERS; index++) {
-            context.ungetService(m_providersServices[index]);
+            getContext().ungetService(m_providersServices[index]);
             m_providersInstances[index].dispose();
         }
         for (index = 0; index < NUMBER_OF_CONSUMERS; index++) {
-            context.ungetService(m_consumersServices[index]);
+            getContext().ungetService(m_consumersServices[index]);
             m_consumersInstances[index].dispose();
         }
-        context.ungetService(m_eventTrackerService);
+        getContext().ungetService(m_eventTrackerService);
         m_eventTrackerInstance.dispose();
         for (int i = 0; i < Donut.FLAVOURS.length; i++) {
-            context.ungetService(m_filteredConsumersServices[i]);
+            getContext().ungetService(m_filteredConsumersServices[i]);
             m_filteredConsumersInstances[i].dispose();
         }
         for (int i = 0; i < TOPICS_LIST.length; i++) {
-            context.ungetService(m_topicsProvidersServices[i]);
+            getContext().ungetService(m_topicsProvidersServices[i]);
             m_topicsProvidersInstances[i].dispose();
-            context.ungetService(m_topicsConsumersServices[i]);
+            getContext().ungetService(m_topicsConsumersServices[i]);
             m_topicsConsumersInstances[i].dispose();
         }
 

Modified: felix/trunk/ipojo/tests/integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/integration-tests/pom.xml?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/integration-tests/pom.xml (original)
+++ felix/trunk/ipojo/tests/integration-tests/pom.xml Mon Dec  1 09:44:13 2008
@@ -13,8 +13,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<groupId>org.apache.felix.ipojo.junit4osgi 
-				</groupId>
+				<groupId>org.apache.felix</groupId>
 				<artifactId>maven-junit4osgi-plugin 
 				</artifactId>
 				<version>1.1.0-SNAPSHOT</version>

Modified: felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
(original)
+++ felix/trunk/ipojo/tests/manipulator/creation/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/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
(original)
+++ felix/trunk/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
Mon Dec  1 09:44:13 2008
@@ -217,11 +217,11 @@
      * Not manipulated.
      */
     public void testCustomConstuctor() {
-        FooService fs = new FooProviderType1(0, "foo", context);
+        FooService fs = new FooProviderType1(0, "foo", getContext());
         Properties props = fs.fooProps();
         assertEquals("Check bar", 0, ((Integer) props.get("bar")).intValue());
         assertEquals("Check foo", "foo", props.get("foo"));
-        assertEquals("Check context", context, props.get("context"));
+        assertEquals("Check context", getContext(), props.get("context"));
     }
     
     public void testSuperCall() {

Modified: felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
(original)
+++ felix/trunk/ipojo/tests/manipulator/manipulation/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/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/ExceptionTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/ExceptionTest.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/ExceptionTest.java
(original)
+++ felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/ExceptionTest.java
Mon Dec  1 09:44:13 2008
@@ -82,7 +82,7 @@
     public void testTry() {
         ServiceReference ref = helper.getServiceReferenceByName(FooService.class.getName(),
ci_lazzy.getInstanceName());
         assertNotNull("Check that a FooService from " + ci_lazzy.getInstanceName() + " is
available",ref);
-        FooProviderType1 fs = (FooProviderType1) context.getService(ref);
+        FooProviderType1 fs = (FooProviderType1) getServiceObject(ref);
         try {
             fs.testTry();
         } catch(Exception e) {

Modified: felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/GetComponentInstanceTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/GetComponentInstanceTest.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/GetComponentInstanceTest.java
(original)
+++ felix/trunk/ipojo/tests/manipulator/manipulation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/GetComponentInstanceTest.java
Mon Dec  1 09:44:13 2008
@@ -87,9 +87,6 @@
 		assertEquals("Check created pojo count", id.getCreatedObjects().length, 1);
 		assertEquals("Check instance description name", id.getName(), compName); 
 		
-		// Unget the service
-		context.ungetService(ref);
-		
 		ci.dispose();
 		
 		// Check that there is no more FooService

Modified: felix/trunk/ipojo/tests/manipulator/manipulator-java5/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/Annotation.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/manipulator-java5/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/Annotation.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/manipulator/manipulator-java5/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/Annotation.java
(original)
+++ felix/trunk/ipojo/tests/manipulator/manipulator-java5/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/Annotation.java
Mon Dec  1 09:44:13 2008
@@ -13,7 +13,7 @@
     
     public void setUp() {
         try {
-            clazz = context.getBundle().
+            clazz = getContext().getBundle().
                 loadClass("org.apache.felix.ipojo.test.scenarios.component.Annotation");
         } catch (ClassNotFoundException e) {
             fail("Cannot load the annotation class : " + e.getMessage());

Modified: felix/trunk/ipojo/tests/manipulator/metadata/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/manipulator/metadata/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java?rev=722146&r1=722145&r2=722146&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/manipulator/metadata/src/main/java/org/apache/felix/ipojo/test/scenarios/component/FooProviderType1.java
(original)
+++ felix/trunk/ipojo/tests/manipulator/metadata/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() {



Mime
View raw message