aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahrw...@apache.org
Subject svn commit: r1144949 [1/5] - in /aries/trunk: application/application-itests/ application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/ blueprint/blueprint-annotation-itest/ blueprint/blueprint-annotation-itest/src/test/...
Date Sun, 10 Jul 2011 20:05:10 GMT
Author: mahrwald
Date: Sun Jul 10 20:05:08 2011
New Revision: 1144949

URL: http://svn.apache.org/viewvc?rev=1144949&view=rev
Log:
ARIES-707: Remove some duplicated code from itests

Added:
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
      - copied, changed from r1144234, aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractMultiBundleTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java
    aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/itest/
    aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/itest/AbstractIntegrationTest.java
    aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/itest/ExtraOptions.java
    aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/itest/RichBundleContext.java
Removed:
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/AbstractIntegrationTest.java
    aries/trunk/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractMultiBundleTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/MultiBundleWithAsmTest.java
    aries/trunk/jndi/jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/AbstractIntegrationTest.java
Modified:
    aries/trunk/application/application-itests/pom.xml
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
    aries/trunk/blueprint/blueprint-annotation-itest/pom.xml
    aries/trunk/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainerBTCustomizerTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainerTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/FragmentTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/QuiesceBlueprintTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/TestConfigAdmin.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/TestReferences.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/TestRegistrationListener.java
    aries/trunk/jmx/jmx-itests/pom.xml
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/AbstractIntegrationTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/cm/ConfigurationAdminMBeanTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/cm/ConfigurationAdminMBeanWhiteboardTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleStateMBeanTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleStateMBeanWhiteboardTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/FrameworkMBeanTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/FrameworkMBeanWhiteboardTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/PackageStateMBeanTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/PackageStateMBeanWhiteboardTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/ServiceStateMBeanTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/framework/ServiceStateMBeanWhiteboardTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/permissionadmin/PermissionAdminMBeanTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/permissionadmin/PermissionAdminMBeanWhiteboardTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/provisioning/ProvisioningServiceMBeanTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/provisioning/ProvisioningServiceMBeanWhiteboardTest.java
    aries/trunk/jmx/jmx-itests/src/test/java/org/apache/aries/jmx/test/blueprint/BlueprintMBeanTest.java
    aries/trunk/jndi/jndi-url-itest/pom.xml
    aries/trunk/jndi/jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/JndiUrlIntegrationTest.java
    aries/trunk/jpa/jpa-container-eclipselink-adapter/src/main/java/org/apache/aries/jpa/eclipselink/adapter/Activator.java
    aries/trunk/jpa/jpa-container-itest/pom.xml
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/EclipseLinkWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/JPAWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/OpenjpaWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/blueprint/aries/itest/JPAInjectionTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/EclipseLinkContextTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/EclipseLinkStartupTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/JPAContextTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/OpenjpaContextTest.java
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/quiesce/itest/QuiesceJPATest.java
    aries/trunk/proxy/proxy-itests/pom.xml
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractProxyTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyTest.java
    aries/trunk/quiesce/quiesce-manager-itest/pom.xml
    aries/trunk/quiesce/quiesce-manager-itest/src/test/java/org/apache/aries/quiesce/manager/itest/QuiesceManagerTest.java
    aries/trunk/testsupport/testsupport-unit/pom.xml
    aries/trunk/transaction/transaction-itests/pom.xml
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/AbstractIntegrationTest.java
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/InvalidTranAttributeTest.java
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/MandatoryTranAttributeTest.java
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/NeverTranAttributeTest.java
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/NotSupportedTranAttributeTest.java
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/RequiredTranAttributeTest.java
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/RequiresNewTranAttributeTest.java
    aries/trunk/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/SupportsTranAttributeTest.java

Modified: aries/trunk/application/application-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/pom.xml?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/pom.xml (original)
+++ aries/trunk/application/application-itests/pom.xml Sun Jul 10 20:05:08 2011
@@ -215,6 +215,12 @@
         	<scope>test</scope>
         </dependency>
         <dependency>
+          <groupId>org.apache.aries.testsupport</groupId>
+          <artifactId>org.apache.aries.testsupport.unit</artifactId>
+          <version>0.3.1-SNAPSHOT</version>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
         	<groupId>org.apache.geronimo.specs</groupId>
         	<artifactId>geronimo-jta_1.1_spec</artifactId>
         	<version>1.1.1</version>

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java Sun Jul 10 20:05:08 2011
@@ -19,9 +19,9 @@
 package org.apache.aries.application.runtime.itests;
 
 import static org.junit.Assert.assertEquals;
+
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.apache.aries.itest.ExtraOptions.*;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -29,6 +29,7 @@ import java.io.FileOutputStream;
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.AriesApplicationContext;
 import org.apache.aries.application.management.AriesApplicationManager;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.sample.HelloWorld;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
@@ -79,7 +80,7 @@ public class BasicAppManagerTest extends
   @Test
   public void testAppWithoutApplicationManifest() throws Exception {
     
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
     
     // application name should be equal to eba name since application.mf is not provided
@@ -87,7 +88,7 @@ public class BasicAppManagerTest extends
     AriesApplicationContext ctx = manager.install(app);
     ctx.start();
     
-    HelloWorld hw = getOsgiService(HelloWorld.class);
+    HelloWorld hw = context().getService(HelloWorld.class);
     String result = hw.getMessage();
     assertEquals (result, "hello world");
     
@@ -97,7 +98,7 @@ public class BasicAppManagerTest extends
 
   @Test
   public void testAppWithApplicationManifest() throws Exception {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
     
     // application name should equal to whatever Application name provided in the application.mf
@@ -106,7 +107,7 @@ public class BasicAppManagerTest extends
     AriesApplicationContext ctx = manager.install(app);
     ctx.start();
     
-    HelloWorld hw = getOsgiService(HelloWorld.class);
+    HelloWorld hw = context().getService(HelloWorld.class);
     String result = hw.getMessage();
     assertEquals (result, "hello world");
     
@@ -116,7 +117,7 @@ public class BasicAppManagerTest extends
 
   @Test
   public void testAppStore() throws Exception {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
     app = manager.resolve(app);
 
@@ -130,7 +131,7 @@ public class BasicAppManagerTest extends
     AriesApplicationContext ctx = manager.install(app);
     ctx.start();
 
-    HelloWorld hw = getOsgiService(HelloWorld.class);
+    HelloWorld hw = context().getService(HelloWorld.class);
     String result = hw.getMessage();
     assertEquals (result, "hello world");
 
@@ -141,18 +142,8 @@ public class BasicAppManagerTest extends
   
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+    return testOptions(
+        paxLogging("DEBUG"),
 
         // Bundles
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
@@ -170,7 +161,6 @@ public class BasicAppManagerTest extends
         mavenBundle("asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
         
         
         /* For debugging, uncomment the next two lines
@@ -183,7 +173,5 @@ public class BasicAppManagerTest extends
         */
 
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java Sun Jul 10 20:05:08 2011
@@ -20,8 +20,7 @@ package org.apache.aries.application.run
 
 import static org.junit.Assert.assertEquals;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.apache.aries.itest.ExtraOptions.*;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -29,6 +28,7 @@ import java.io.FileOutputStream;
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.AriesApplicationContext;
 import org.apache.aries.application.management.AriesApplicationManager;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.sample.HelloWorld;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
@@ -79,7 +79,7 @@ public class BasicNoOpResolverTest exten
   @Test
   public void testAppWithoutApplicationManifest() throws Exception {
     
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
     
     // application name should be equal to eba name since application.mf is not provided
@@ -87,7 +87,7 @@ public class BasicNoOpResolverTest exten
     AriesApplicationContext ctx = manager.install(app);
     ctx.start();
     
-    HelloWorld hw = getOsgiService(HelloWorld.class);
+    HelloWorld hw = context().getService(HelloWorld.class);
     String result = hw.getMessage();
     assertEquals (result, "hello world");
     
@@ -97,7 +97,7 @@ public class BasicNoOpResolverTest exten
 
   @Test
   public void testAppWithApplicationManifest() throws Exception {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
     
     // application name should equal to whatever Application name provided in the application.mf
@@ -106,7 +106,7 @@ public class BasicNoOpResolverTest exten
     AriesApplicationContext ctx = manager.install(app);
     ctx.start();
     
-    HelloWorld hw = getOsgiService(HelloWorld.class);
+    HelloWorld hw = context().getService(HelloWorld.class);
     String result = hw.getMessage();
     assertEquals (result, "hello world");
     
@@ -117,18 +117,8 @@ public class BasicNoOpResolverTest exten
   
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+    return testOptions(
+        paxLogging("DEBUG"),
 
         // Bundles
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
@@ -145,7 +135,6 @@ public class BasicNoOpResolverTest exten
         mavenBundle("asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
         
         
         /* For debugging, uncomment the next two lines
@@ -158,7 +147,5 @@ public class BasicNoOpResolverTest exten
         */
 
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java Sun Jul 10 20:05:08 2011
@@ -22,10 +22,10 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository;
 
+import static org.apache.aries.itest.ExtraOptions.*;
+
 import java.io.File;
 import java.io.FileOutputStream;
 
@@ -37,6 +37,7 @@ import org.apache.aries.application.mana
 import org.apache.aries.application.modelling.ModellingManager;
 import org.apache.aries.application.runtime.itests.util.IsolationTestUtils;
 import org.apache.aries.isolated.sample.HelloWorld;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
 import org.apache.aries.util.VersionRange;
@@ -132,7 +133,7 @@ public class IsolatedRuntimeTest extends
   @Test
   public void testAppWithoutApplicationManifest() throws Exception {
     
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
     AriesApplicationContext ctx = manager.install(app);
     
@@ -145,7 +146,7 @@ public class IsolatedRuntimeTest extends
   @Test
   public void testAppWithApplicationManifest() throws Exception {
         
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
     AriesApplicationContext ctx = manager.install(app);
     
@@ -158,7 +159,7 @@ public class IsolatedRuntimeTest extends
   @Test
   public void testUninstallReinstall() throws Exception {
     
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
     AriesApplicationContext ctx = manager.install(app);
     
@@ -184,7 +185,7 @@ public class IsolatedRuntimeTest extends
   @Test
   public void testAppWithFragment() throws Exception
   {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("withFragment.eba")));
     AriesApplicationContext ctx = manager.install(app);
 
@@ -198,13 +199,13 @@ public class IsolatedRuntimeTest extends
   @Test
   public void testAppWithGlobalRepositoryBundle() throws Exception
   {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
     
     IsolationTestUtils.prepareSampleBundleV2(bundleContext, 
-        getOsgiService(RepositoryGenerator.class), 
-        getOsgiService(RepositoryAdmin.class), 
-        getOsgiService(ModellingManager.class));
+        context().getService(RepositoryGenerator.class), 
+        context().getService(RepositoryAdmin.class), 
+        context().getService(ModellingManager.class));
 
     AriesApplication newApp = manager.resolve(app, new ResolveConstraint() {
       @Override
@@ -241,19 +242,10 @@ public class IsolatedRuntimeTest extends
   
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
+    return testOptions(
         repository( "http://repository.ops4j.org/maven2" ),
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+        
+        paxLogging("DEBUG"),
 
         // do not provision against the local runtime
         // Bundles
@@ -276,7 +268,6 @@ public class IsolatedRuntimeTest extends
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.repository"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
 
         /* For debugging, uncommenting the following two lines and add the imports */
         /*
@@ -289,7 +280,5 @@ public class IsolatedRuntimeTest extends
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
          */
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java Sun Jul 10 20:05:08 2011
@@ -21,8 +21,7 @@ package org.apache.aries.application.run
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.apache.aries.itest.ExtraOptions.*;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -34,6 +33,7 @@ import java.io.OutputStream;
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.AriesApplicationContext;
 import org.apache.aries.application.management.AriesApplicationManager;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
 import org.apache.aries.util.filesystem.FileSystem;
@@ -50,7 +50,6 @@ import org.osgi.service.blueprint.contai
 import org.osgi.service.blueprint.container.BlueprintListener;
 
 @RunWith(JUnit4TestRunner.class)
-
 public class MinimumImportsTest extends AbstractIntegrationTest {
 
   /* Use @Before not @BeforeClass so as to ensure that these resources
@@ -138,9 +137,9 @@ public class MinimumImportsTest extends 
     AppMgrClientBlueprintListener acbl = new AppMgrClientBlueprintListener();
     ServiceRegistration sr = bundleContext.registerService("org.osgi.service.blueprint.container.BlueprintListener", acbl, null);
 
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("appmgrclienttest.eba")));
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
 
     Repository[] repos = repositoryAdmin.listRepositories();
     for (Repository repo : repos) {
@@ -167,18 +166,8 @@ public class MinimumImportsTest extends 
 
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+    return testOptions(
+        paxLogging("DEBUG"),
 
         // Bundles
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
@@ -196,7 +185,6 @@ public class MinimumImportsTest extends 
         mavenBundle("asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
 
         /* For debugging, uncomment the next two lines*/
         /*vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5007"),
@@ -208,7 +196,5 @@ public class MinimumImportsTest extends 
 
 
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java Sun Jul 10 20:05:08 2011
@@ -20,8 +20,7 @@ package org.apache.aries.application.run
 
 import static org.junit.Assert.assertEquals;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.apache.aries.itest.ExtraOptions.*;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -32,6 +31,7 @@ import java.io.InputStreamReader;
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.AriesApplicationContext;
 import org.apache.aries.application.management.AriesApplicationManager;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.sample.HelloWorld;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
@@ -113,7 +113,7 @@ public class OBRAppManagerTest extends A
 	  @Test
 	  public void testAppWithApplicationManifest() throws Exception {
 	    
-	    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+	    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
 	    
 	    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
@@ -131,14 +131,14 @@ public class OBRAppManagerTest extends A
 	      }
 	    }
 	    
-	    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+	    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
 	    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
 	    app = manager.resolve(app);
 	    //installing requires a valid url for the bundle in repository.xml.
 	    AriesApplicationContext ctx = manager.install(app);
 	    ctx.start();
 
-	    HelloWorld hw = getOsgiService(HelloWorld.class);
+	    HelloWorld hw = context().getService(HelloWorld.class);
 	    String result = hw.getMessage();
 	    assertEquals (result, "hello world");
 
@@ -148,19 +148,8 @@ public class OBRAppManagerTest extends A
 
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
+    return testOptions(
+        paxLogging("DEBUG"),
 
         // Bundles
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
@@ -179,7 +168,6 @@ public class OBRAppManagerTest extends A
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
 
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
 
         //        /* For debugging, uncomment the next two lines
         //        vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
@@ -192,7 +180,5 @@ public class OBRAppManagerTest extends A
          */
 
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }
\ No newline at end of file

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java Sun Jul 10 20:05:08 2011
@@ -17,11 +17,11 @@
  * under the License.
  */
 package org.apache.aries.application.runtime.itests;
+
 import static junit.framework.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.apache.aries.itest.ExtraOptions.*;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -51,6 +51,7 @@ import org.apache.aries.application.mode
 import org.apache.aries.application.modelling.ModellerException;
 import org.apache.aries.application.utils.AppConstants;
 import org.apache.aries.application.utils.manifest.ContentFactory;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.sample.HelloWorld;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
@@ -70,6 +71,7 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+
 @RunWith(JUnit4TestRunner.class)
 public class OBRResolverAdvancedTest extends AbstractIntegrationTest 
 {
@@ -243,7 +245,7 @@ public class OBRResolverAdvancedTest ext
     System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
     generateOBRRepoXML(false, TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar",  USE_BUNDLE_BY_REFERENCE+".jar");
     
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     
     Repository[] repos = repositoryAdmin.listRepositories();
     for (Repository repo : repos) {
@@ -252,7 +254,7 @@ public class OBRResolverAdvancedTest ext
     
     repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("demo.eba")));
     
     app = manager.resolve(app);
@@ -274,7 +276,7 @@ public class OBRResolverAdvancedTest ext
     System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
     generateOBRRepoXML(false, TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar", USE_BUNDLE_BY_REFERENCE+".jar");
     
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     
     Repository[] repos = repositoryAdmin.listRepositories();
     for (Repository repo : repos) {
@@ -283,7 +285,7 @@ public class OBRResolverAdvancedTest ext
     
     repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("demo.eba")));
     //installing requires a valid url for the bundle in repository.xml.
     
@@ -392,7 +394,7 @@ public class OBRResolverAdvancedTest ext
     // do not provision against the local runtime
     System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
     
-    RepositoryGenerator repositoryGenerator = getOsgiService(RepositoryGenerator.class);
+    RepositoryGenerator repositoryGenerator = context().getService(RepositoryGenerator.class);
     
     String fileURI = new File(REPO_BUNDLE+".jar").toURI().toString();
     File repoXml = new File("repository.xml");
@@ -443,7 +445,7 @@ public class OBRResolverAdvancedTest ext
     System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
     generateOBRRepoXML(false, HELLO_WORLD_SERVICE_BUNDLE1 + ".jar", HELLO_WORLD_SERVICE_BUNDLE2 + ".jar");
     
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     
     Repository[] repos = repositoryAdmin.listRepositories();
     for (Repository repo : repos) {
@@ -452,7 +454,7 @@ public class OBRResolverAdvancedTest ext
     
     repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("hello.eba")));
     AriesApplicationContext ctx = manager.install(app);
     ctx.start();
@@ -462,7 +464,7 @@ public class OBRResolverAdvancedTest ext
     	Thread.sleep(5000);
     } catch (InterruptedException ix) {}
     
-    HelloWorld hw = getOsgiService(HelloWorld.class);
+    HelloWorld hw = context().getService(HelloWorld.class);
     String result = hw.getMessage();
     assertEquals (result, "hello world");
     
@@ -472,7 +474,7 @@ public class OBRResolverAdvancedTest ext
     // is fixed. This tracks the problem of provisioning only one service even when we 
     // specify multiple services.
      
-     /** HelloWorldManager hwm = getOsgiService(HelloWorldManager.class);
+     /** HelloWorldManager hwm = context().getService(HelloWorldManager.class);
      * int numberOfServices = hwm.getNumOfHelloServices();
      * assertEquals(2, numberOfServices); 
      */
@@ -487,8 +489,8 @@ public class OBRResolverAdvancedTest ext
   {
     Set<ModelledResource> mrs = new HashSet<ModelledResource>();
     FileOutputStream fout = new FileOutputStream("repository.xml");
-    RepositoryGenerator repositoryGenerator = getOsgiService(RepositoryGenerator.class);
-    ModelledResourceManager modelledResourceManager = getOsgiService(ModelledResourceManager.class);
+    RepositoryGenerator repositoryGenerator = context().getService(RepositoryGenerator.class);
+    ModelledResourceManager modelledResourceManager = context().getService(ModelledResourceManager.class);
     for (String fileName : bundleFiles) {
       File bundleFile = new File(fileName);
       IDirectory jarDir = FileSystem.getFSRoot(bundleFile);
@@ -504,7 +506,7 @@ public class OBRResolverAdvancedTest ext
 
   @After
   public void clearRepository() {
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     Repository[] repos = repositoryAdmin.listRepositories();
     if ((repos != null) && (repos.length >0)) {
       for (Repository repo : repos) {
@@ -515,19 +517,9 @@ public class OBRResolverAdvancedTest ext
 
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
+    return testOptions(
+        paxLogging("DEBUG"),
+        
         // Bundles
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils"),
@@ -544,7 +536,7 @@ public class OBRResolverAdvancedTest ext
         mavenBundle("asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
+
         /* For debugging, uncomment the next two lines  */
         /*vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5010"),
         waitForFrameworkStartup(),  */
@@ -555,7 +547,5 @@ public class OBRResolverAdvancedTest ext
         */
 
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }
\ No newline at end of file

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java Sun Jul 10 20:05:08 2011
@@ -21,8 +21,7 @@ package org.apache.aries.application.run
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.apache.aries.itest.ExtraOptions.*;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -42,6 +41,7 @@ import org.apache.aries.application.mana
 import org.apache.aries.application.modelling.ModelledResource;
 import org.apache.aries.application.modelling.ModelledResourceManager;
 import org.apache.aries.application.utils.AppConstants;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
 import org.apache.aries.util.filesystem.FileSystem;
@@ -138,7 +138,7 @@ public class OBRResolverTest extends Abs
 
   @After
   public void clearRepository() {
-	  RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+	  RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
 	  Repository[] repos = repositoryAdmin.listRepositories();
 	  if ((repos != null) && (repos.length >0)) {
 		  for (Repository repo : repos) {
@@ -153,7 +153,7 @@ public class OBRResolverTest extends Abs
     System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
     generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
     
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     
     Repository[] repos = repositoryAdmin.listRepositories();
     for (Repository repo : repos) {
@@ -162,7 +162,7 @@ public class OBRResolverTest extends Abs
     
     repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
     //installing requires a valid url for the bundle in repository.xml.
     
@@ -180,7 +180,7 @@ public class OBRResolverTest extends Abs
     System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
     generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
     
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     
     Repository[] repos = repositoryAdmin.listRepositories();
     for (Repository repo : repos) {
@@ -189,7 +189,7 @@ public class OBRResolverTest extends Abs
     
     repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
     //installing requires a valid url for the bundle in repository.xml.
     
@@ -205,7 +205,7 @@ public class OBRResolverTest extends Abs
     System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
     generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
     
-    RepositoryAdmin repositoryAdmin = getOsgiService(RepositoryAdmin.class);
+    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     
     Repository[] repos = repositoryAdmin.listRepositories();
     for (Repository repo : repos) {
@@ -214,7 +214,7 @@ public class OBRResolverTest extends Abs
     
     repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
     //installing requires a valid url for the bundle in repository.xml.
     
@@ -252,8 +252,8 @@ public class OBRResolverTest extends Abs
   {
     Set<ModelledResource> mrs = new HashSet<ModelledResource>();
     FileOutputStream fout = new FileOutputStream("repository.xml");
-    RepositoryGenerator repositoryGenerator = getOsgiService(RepositoryGenerator.class);
-    ModelledResourceManager modelledResourceManager = getOsgiService(ModelledResourceManager.class);
+    RepositoryGenerator repositoryGenerator = context().getService(RepositoryGenerator.class);
+    ModelledResourceManager modelledResourceManager = context().getService(ModelledResourceManager.class);
     for (String fileName : bundleFiles) {
       File bundleFile = new File(fileName);
       IDirectory jarDir = FileSystem.getFSRoot(bundleFile);
@@ -266,19 +266,9 @@ public class OBRResolverTest extends Abs
 
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
+    return testOptions(
+        paxLogging("DEBUG"),
+        
         // Bundles
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
         mavenBundle("asm", "asm-all"),
@@ -295,7 +285,6 @@ public class OBRResolverTest extends Abs
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
 
         /* For debugging, uncomment the next two lines */
         // vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"),
@@ -307,7 +296,5 @@ public class OBRResolverTest extends Abs
         */
 
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }
\ No newline at end of file

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java (original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java Sun Jul 10 20:05:08 2011
@@ -23,9 +23,10 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
+import static org.apache.aries.itest.ExtraOptions.*;
+
 import java.io.File;
 import java.io.FileOutputStream;
 import java.util.Hashtable;
@@ -46,6 +47,7 @@ import org.apache.aries.application.mode
 import org.apache.aries.application.runtime.itests.util.IsolationTestUtils;
 import org.apache.aries.application.utils.AppConstants;
 import org.apache.aries.isolated.sample.HelloWorld;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.apache.aries.unittest.fixture.ArchiveFixture;
 import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
 import org.apache.aries.util.VersionRange;
@@ -54,18 +56,22 @@ import org.apache.aries.util.manifest.Ma
 import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 
+@RunWith(JUnit4TestRunner.class)
 public class UpdateAppTest extends AbstractIntegrationTest {
   private static final String SAMPLE_APP_NAME = "org.apache.aries.sample2";
   /* Use @Before not @BeforeClass so as to ensure that these resources
    * are created in the paxweb temp directory, and not in the svn tree 
    */
   static boolean createdApplications = false;
+  
   @Before
-  public static void createApplications() throws Exception {
+  public void createApplications() throws Exception {
        
     if (createdApplications) { 
       return;
@@ -111,7 +117,7 @@ public class UpdateAppTest extends Abstr
   
   @Test
   public void testFullUpdate() throws Exception {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = setupApp();
     
     updateApp(manager, app);
@@ -121,7 +127,7 @@ public class UpdateAppTest extends Abstr
   
   @Test
   public void testFineUpdate() throws Exception {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = setupApp();
     
     BundleContext oldCtx = IsolationTestUtils.findIsolatedAppBundleContext(bundleContext, SAMPLE_APP_NAME);
@@ -138,7 +144,7 @@ public class UpdateAppTest extends Abstr
   @Test
   public void testUpdateThenStart() throws Exception
   {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
     AriesApplicationContext ctx = manager.install(app);
     app = ctx.getApplication();
@@ -204,7 +210,7 @@ public class UpdateAppTest extends Abstr
   }
   
   private AriesApplication setupApp() throws Exception {
-    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
     AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
     AriesApplicationContext ctx = manager.install(app);
     app = ctx.getApplication();
@@ -217,9 +223,9 @@ public class UpdateAppTest extends Abstr
   
   private AriesApplicationContext updateApp(AriesApplicationManager manager, AriesApplication app) throws Exception {
     IsolationTestUtils.prepareSampleBundleV2(bundleContext, 
-        getOsgiService(RepositoryGenerator.class), 
-        getOsgiService(RepositoryAdmin.class), 
-        getOsgiService(ModellingManager.class));
+        context().getService(RepositoryGenerator.class), 
+        context().getService(RepositoryAdmin.class), 
+        context().getService(ModellingManager.class));
     
     AriesApplication newApp = manager.resolve(app, new ResolveConstraint() {
       public String getBundleName() {
@@ -242,19 +248,9 @@ public class UpdateAppTest extends Abstr
 
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
-    Option[] options = options(
-        // Log
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-        mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-        // Felix Config Admin
-        mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-        // Felix mvn url handler
-        mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-        // this is how you set the default log level when using pax
-        // logging (logProfile)
-        systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
+    return testOptions(
+        paxLogging("DEBUG"),
+        
         // do not provision against the local runtime
         systemProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP).value("true"),
         // Bundles
@@ -278,7 +274,6 @@ public class UpdateAppTest extends Abstr
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.isolated"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec"),
-        mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
 
         // new VMOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5011"),
 
@@ -288,7 +283,5 @@ public class UpdateAppTest extends Abstr
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
          */
         equinox().version("3.5.0"));
-    options = updateOptions(options);
-    return options;
   }
 }

Modified: aries/trunk/blueprint/blueprint-annotation-itest/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-annotation-itest/pom.xml?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-annotation-itest/pom.xml (original)
+++ aries/trunk/blueprint/blueprint-annotation-itest/pom.xml Sun Jul 10 20:05:08 2011
@@ -184,6 +184,12 @@
             <artifactId>org.apache.aries.blueprint.annotation.impl</artifactId>
             <version>0.3.2-SNAPSHOT</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.aries.testsupport</groupId>
+          <artifactId>org.apache.aries.testsupport.unit</artifactId>
+          <version>0.3.1-SNAPSHOT</version>
+          <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>

Modified: aries/trunk/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java (original)
+++ aries/trunk/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java Sun Jul 10 20:05:08 2011
@@ -23,36 +23,26 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-
 import java.text.SimpleDateFormat;
 import java.util.Currency;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Set;
-
 import org.apache.aries.blueprint.sample.Bar;
 import org.apache.aries.blueprint.sample.Foo;
+import org.apache.aries.itest.AbstractIntegrationTest;
+import org.apache.aries.itest.RichBundleContext;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.*;
 import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
+import static org.apache.aries.itest.ExtraOptions.*;
 
 @RunWith(JUnit4TestRunner.class)
 public class BlueprintAnnotationTest extends AbstractIntegrationTest {
 
     @Test
     public void test() throws Exception {
-        BlueprintContainer blueprintContainer = getBlueprintContainerForBundle(
-                 bundleContext, "org.apache.aries.blueprint.sample-annotation",
-                5000);
+        BlueprintContainer blueprintContainer = getBlueprintContainerForBundle(context(), "org.apache.aries.blueprint.sample-annotation");
     
         assertNotNull(blueprintContainer);
     
@@ -78,27 +68,20 @@ public class BlueprintAnnotationTest ext
         
         assertNotNull(blueprintContainer.getComponentInstance("fragment"));
     
-       obj = getOsgiService(bundleContext, Foo.class, null, 5000);
+        obj = context().getService(Foo.class, null, 5000);
         assertNotNull(obj);
         assertEquals(foo.toString(), obj.toString());
     }
 
+    private BlueprintContainer getBlueprintContainerForBundle(RichBundleContext context, String symbolicName) {
+        return context.getService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=" + symbolicName + ")");
+    }    
+    
     @org.ops4j.pax.exam.junit.Configuration
     public static Option[] configuration() {
-        Option[] options = options(
-            // Log
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-            // Felix Config Admin
-            mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-            // Felix mvn url handler
-            mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-
-            // this is how you set the default log level when using pax logging (logProfile)
-            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+        return testOptions(
+            paxLogging("DEBUG"),
 
-            // Bundles
             mavenBundle("org.apache.aries", "org.apache.aries.util"),
             mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
             mavenBundle("asm", "asm-all"),
@@ -108,14 +91,10 @@ public class BlueprintAnnotationTest ext
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.impl"),
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample-annotation"),
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample-fragment"),
-            //mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample"),
             mavenBundle("org.osgi", "org.osgi.compendium"),
-            //org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
 
             equinox().version("3.5.0")
         );
-        options = updateOptions(options);
-        return options;
     }
 
 }

Copied: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java (from r1144234, aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractMultiBundleTest.java)
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java?p2=aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java&p1=aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractMultiBundleTest.java&r1=1144234&r2=1144949&rev=1144949&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractMultiBundleTest.java (original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java Sun Jul 10 20:05:08 2011
@@ -18,13 +18,14 @@
  */
 package org.apache.aries.blueprint.itests;
 
+import static org.apache.aries.itest.ExtraOptions.mavenBundle;
+import static org.apache.aries.itest.ExtraOptions.paxLogging;
+import static org.apache.aries.itest.ExtraOptions.testOptions;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -35,6 +36,7 @@ import org.apache.aries.blueprint.testbu
 import org.apache.aries.blueprint.testbundlea.ProcessableBean;
 import org.apache.aries.blueprint.testbundlea.ProcessableBean.Phase;
 import org.apache.aries.blueprint.testbundleb.TestBean;
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -42,7 +44,8 @@ import org.ops4j.pax.exam.junit.JUnit4Te
 import org.osgi.framework.Bundle;
 import org.osgi.service.blueprint.container.BlueprintContainer;
 
-public class AbstractMultiBundleTest extends AbstractIntegrationTest{
+@RunWith(JUnit4TestRunner.class)
+public class ASMMultiBundleTest extends AbstractIntegrationTest {
 
     private void checkInterceptorLog(String []expected, List<String> log){
         assertNotNull("interceptor log should not be null",log);
@@ -79,22 +82,23 @@ public class AbstractMultiBundleTest ext
         }
     }
     
-    protected void doCommonMultiBundleTest() throws Exception {
+    @Test
+    public void multiBundleTest() throws Exception {
         
         //bundlea provides the ns handlers, bean processors, interceptors etc for this test.
-        Bundle bundlea = getInstalledBundle("org.apache.aries.blueprint.testbundlea");
+        Bundle bundlea = context().getBundleByName("org.apache.aries.blueprint.testbundlea");
         assertNotNull(bundlea);
         bundlea.start();
         
         //bundleb makes use of the extensions provided by bundlea
-        Bundle bundleb = getInstalledBundle("org.apache.aries.blueprint.testbundleb");
+        Bundle bundleb = context().getBundleByName("org.apache.aries.blueprint.testbundleb");
         assertNotNull(bundleb);
         bundleb.start();
         
         //bundleb's container will hold the beans we need to query to check the function
         //provided by bundlea functioned as expected
         BlueprintContainer beanContainer = 
-            getBlueprintContainerForBundle( bundleContext , "org.apache.aries.blueprint.testbundleb", DEFAULT_TIMEOUT);
+            Helper.getBlueprintContainerForBundle(context(), "org.apache.aries.blueprint.testbundleb");
         assertNotNull(beanContainer);
 
         //TestBeanA should have the values below, no interference should be present from other sources.
@@ -122,7 +126,7 @@ public class AbstractMultiBundleTest ext
        
         //handlers are in bundlea, with its own container.
         BlueprintContainer handlerContainer = 
-            getBlueprintContainerForBundle( bundleContext , "org.apache.aries.blueprint.testbundlea", DEFAULT_TIMEOUT);
+            Helper.getBlueprintContainerForBundle( context(), "org.apache.aries.blueprint.testbundlea");
         assertNotNull(handlerContainer);
         
         Object ns1 = handlerContainer.getComponentInstance("NSHandlerOne");
@@ -186,4 +190,15 @@ public class AbstractMultiBundleTest ext
         //assertEquals(pb.getProcessedBy(Phase.BEFORE_DESTROY).get(0),bp);
         //assertEquals(pb.getProcessedBy(Phase.AFTER_DESTROY).get(0),bp);
     }
+    
+    @org.ops4j.pax.exam.junit.Configuration
+    public static Option[] configuration() {
+        return testOptions(
+            paxLogging("DEBUG"),
+            Helper.blueprintBundles(),
+            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.testbundlea").noStart(),
+            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.testbundleb").noStart(),
+            equinox().version("3.5.0")
+        );
+    } 
 }

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java (original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java Sun Jul 10 20:05:08 2011
@@ -20,18 +20,16 @@ package org.apache.aries.blueprint.itest
 
 import static org.junit.Assert.assertNotNull;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-
 import java.io.InputStream;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 
+import org.apache.aries.itest.AbstractIntegrationTest;
+import org.apache.aries.itest.RichBundleContext;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
@@ -44,6 +42,8 @@ import org.osgi.service.cm.Configuration
 import org.osgi.service.framework.CompositeBundle;
 import org.osgi.service.framework.CompositeBundleFactory;
 
+import static org.apache.aries.itest.ExtraOptions.*;
+
 /**
  * This test is based on the BlueprintContainerBTCustomizerTest.  but this test starts the
  * blueprint sample before the blueprint bundle is started so going a slightly 
@@ -56,7 +56,7 @@ public class BlueprintContainer2BTCustom
     @Test
     public void test() throws Exception {
         // Create a config to check the property placeholder
-        ConfigurationAdmin ca = getOsgiService(ConfigurationAdmin.class);
+        ConfigurationAdmin ca = context().getService(ConfigurationAdmin.class);        
         Configuration cf = ca.getConfiguration("blueprint-sample-placeholder", null);
         Hashtable props = new Hashtable();
         props.put("key.b", "10");
@@ -86,7 +86,7 @@ public class BlueprintContainer2BTCustom
 
             BundleContext compositeBundleContext = cb.getCompositeFramework().getBundleContext();
             // install the blueprint sample onto the framework associated with the composite bundle
-            MavenArtifactProvisionOption mapo = mavenBundleInTest("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample");
+            MavenArtifactProvisionOption mapo = mavenBundleInTest(getClass().getClassLoader(), "org.apache.aries.blueprint", "org.apache.aries.blueprint.sample");
             // let's use input stream to avoid invoking mvn url handler which isn't avail in the child framework.
             InputStream is = new URL(mapo.getURL()).openStream();
             Bundle bundle = compositeBundleContext.installBundle(mapo.getURL(), is);
@@ -97,12 +97,12 @@ public class BlueprintContainer2BTCustom
             bundle.start();
             
             // start the blueprint bundle and it should detect the previously started blueprint sample
-            Bundle blueprintBundle = getInstalledBundle("org.apache.aries.blueprint");
+            Bundle blueprintBundle = context().getBundleByName("org.apache.aries.blueprint");
             blueprintBundle.start();
             Thread.sleep(2000);
 
             // do the test
-            testBlueprintContainer(compositeBundleContext, bundle);
+            Helper.testBlueprintContainer(new RichBundleContext(compositeBundleContext), bundle);
             
             // unget the service
             bundleContext.ungetService(sr);
@@ -111,34 +111,11 @@ public class BlueprintContainer2BTCustom
 
     @org.ops4j.pax.exam.junit.Configuration
     public static Option[] configuration() {
-        Option[] options = options(
-            // Log
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-            // Felix Config Admin
-            mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-            // Felix mvn url handler
-            mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-
-            // this is how you set the default log level when using pax logging (logProfile)
-            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
-            // Bundles
-            mavenBundle("org.apache.aries", "org.apache.aries.util"),
-            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-            mavenBundle("asm", "asm-all"),
-            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").noStart(),
-            // don't install the blueprint sample here as it will be installed onto the same framework as the blueprint core bundle
-            // mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),
-            mavenBundle("org.osgi", "org.osgi.compendium"),
-//            org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-
+        return testOptions(
+            paxLogging("DEBUG"),
+            Helper.blueprintBundles(false),
             equinox().version("3.5.0")
         );
-
-        options = updateOptions(options);
-        return options;
     }
 
 }

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java (original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java Sun Jul 10 20:05:08 2011
@@ -20,11 +20,9 @@ package org.apache.aries.blueprint.itest
 
 import static org.junit.Assert.assertNotNull;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-
 import java.util.Hashtable;
 
+import org.apache.aries.itest.AbstractIntegrationTest;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -33,6 +31,8 @@ import org.osgi.framework.Bundle;
 import org.osgi.service.cm.Configuration;
 import org.osgi.service.cm.ConfigurationAdmin;
 
+import static org.apache.aries.itest.ExtraOptions.*;
+
 /**
  * this test is based on blueprint container test, but this test starts the
  * blueprint sample before the blueprint bundle is started so going a slightly 
@@ -45,51 +45,33 @@ public class BlueprintContainer2Test ext
     @Test
     public void test() throws Exception {
         // Create a config to check the property placeholder
-        ConfigurationAdmin ca = getOsgiService(ConfigurationAdmin.class);
+        ConfigurationAdmin ca = context().getService(ConfigurationAdmin.class);
         Configuration cf = ca.getConfiguration("blueprint-sample-placeholder", null);
         Hashtable props = new Hashtable();
         props.put("key.b", "10");
         cf.update(props);
 
-        Bundle bundle = getInstalledBundle("org.apache.aries.blueprint.sample");
-        Bundle blueprintBundle = getInstalledBundle("org.apache.aries.blueprint");
+        Bundle bundle = context().getBundleByName("org.apache.aries.blueprint.sample");
+        Bundle blueprintBundle = context().getBundleByName("org.apache.aries.blueprint");
         assertNotNull(bundle);
 
         bundle.start();
         blueprintBundle.start();
         
         // do the test
-        testBlueprintContainer(bundle);
+        Helper.testBlueprintContainer(context(), bundle);
     }
 
     @org.ops4j.pax.exam.junit.Configuration
     public static Option[] configuration() {
-        Option[] options = options(
-            // Log
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-            // Felix Config Admin
-            mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-            // Felix mvn url handler
-            mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-
-            // this is how you set the default log level when using pax logging (logProfile)
-            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
-            // Bundles
+        return testOptions(
+            paxLogging("DEBUG"),
+            Helper.blueprintBundles(false),
+            
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),
-            mavenBundle("org.apache.aries", "org.apache.aries.util"),
-            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-            mavenBundle("asm", "asm-all"),
-            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").noStart(),
-            mavenBundle("org.osgi", "org.osgi.compendium"),
-//            org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
 
             equinox().version("3.5.0")
         );
-        options = updateOptions(options);
-        return options;
     }
 
 }

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainerBTCustomizerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainerBTCustomizerTest.java?rev=1144949&r1=1144948&r2=1144949&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainerBTCustomizerTest.java (original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainerBTCustomizerTest.java Sun Jul 10 20:05:08 2011
@@ -20,20 +20,16 @@ package org.apache.aries.blueprint.itest
 
 import static org.junit.Assert.assertNotNull;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
-
 import java.io.InputStream;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 
+import org.apache.aries.itest.AbstractIntegrationTest;
+import org.apache.aries.itest.RichBundleContext;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
@@ -46,6 +42,8 @@ import org.osgi.service.cm.Configuration
 import org.osgi.service.framework.CompositeBundle;
 import org.osgi.service.framework.CompositeBundleFactory;
 
+import static org.apache.aries.itest.ExtraOptions.*;
+
 /**
  * This test is based on the BlueprintContainerTest.  The difference is that in this test,
  * the blueprint sample is installed into a child framework that is associated with a composite
@@ -59,7 +57,7 @@ public class BlueprintContainerBTCustomi
     @Test
     public void test() throws Exception {
         // Create a config to check the property placeholder
-        ConfigurationAdmin ca = getOsgiService(ConfigurationAdmin.class);
+        ConfigurationAdmin ca = context().getService(ConfigurationAdmin.class);
         Configuration cf = ca.getConfiguration("blueprint-sample-placeholder", null);
         Hashtable props = new Hashtable();
         props.put("key.b", "10");
@@ -89,7 +87,7 @@ public class BlueprintContainerBTCustomi
 
             BundleContext compositeBundleContext = cb.getCompositeFramework().getBundleContext();
             // install the blueprint sample onto the framework associated with the composite bundle
-            MavenArtifactProvisionOption mapo = mavenBundleInTest("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample");
+            MavenArtifactProvisionOption mapo = mavenBundleInTest(getClass().getClassLoader(), "org.apache.aries.blueprint", "org.apache.aries.blueprint.sample");
             // let's use input stream to avoid invoking mvn url handler which isn't avail in the child framework.
             InputStream is = new URL(mapo.getURL()).openStream();
             Bundle bundle = compositeBundleContext.installBundle(mapo.getURL(), is);
@@ -100,7 +98,7 @@ public class BlueprintContainerBTCustomi
             bundle.start();
 
             // do the test
-            testBlueprintContainer(compositeBundleContext, bundle);
+            Helper.testBlueprintContainer(new RichBundleContext(compositeBundleContext), bundle);
             
             // unget the service
             bundleContext.ungetService(sr);
@@ -110,42 +108,11 @@ public class BlueprintContainerBTCustomi
 
     @org.ops4j.pax.exam.junit.Configuration
     public static Option[] configuration() {
-        Option[] options = options(
-            // Log
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-            mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-            // Felix Config Admin
-            mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
-            // Felix mvn url handler
-            mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
-
-
-            // this is how you set the default log level when using pax logging (logProfile)
-            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
-            // Bundles
-            mavenBundle("org.apache.aries", "org.apache.aries.util"),
-            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-            mavenBundle("asm", "asm-all"),
-            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
-            // don't install the blueprint sample here as it will be installed onto the same framework as the blueprint core bundle
-            //mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),
-            mavenBundle("org.osgi", "org.osgi.compendium"),
-//            org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-
-            /* For debugging, uncomment the next two lines */
-//          vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"),
-//          waitForFrameworkStartup(),
-
-          /* For debugging, uncomment the next two lines
-          and add these imports:
-          import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
-          import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
-          */
+        return testOptions(
+            paxLogging("DEBUG"),
+            Helper.blueprintBundles(),
             equinox().version("3.5.1")
         );
-        options = updateOptions(options);
-        return options;
     }
 
 }



Mime
View raw message