Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.virgo.kernel.osgi')
-rw-r--r--org.eclipse.virgo.kernel.osgi/.classpath6
-rw-r--r--org.eclipse.virgo.kernel.osgi/ivy.xml2
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/GlobalRegionTests.java58
3 files changed, 64 insertions, 2 deletions
diff --git a/org.eclipse.virgo.kernel.osgi/.classpath b/org.eclipse.virgo.kernel.osgi/.classpath
index 0c0a67c1..e7c7ca15 100644
--- a/org.eclipse.virgo.kernel.osgi/.classpath
+++ b/org.eclipse.virgo.kernel.osgi/.classpath
@@ -39,7 +39,11 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.M04/org.eclipse.virgo.teststubs.osgi-3.0.0.M04.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.M04/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.M04.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110512073827/org.eclipse.virgo.medic.test-3.0.0.D-20110512073827.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110512073827/org.eclipse.virgo.medic.test-sources-3.0.0.D-20110512073827.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
+ <classpathentry kind="src" path="/org.eclipse.virgo.kernel.core">
+ <attributes>
+ <attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.M04/org.eclipse.virgo.osgi.launcher-3.0.0.M04.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.M04/org.eclipse.virgo.osgi.launcher-sources-3.0.0.M04.jar"/>
diff --git a/org.eclipse.virgo.kernel.osgi/ivy.xml b/org.eclipse.virgo.kernel.osgi/ivy.xml
index 196706cb..6ab85564 100644
--- a/org.eclipse.virgo.kernel.osgi/ivy.xml
+++ b/org.eclipse.virgo.kernel.osgi/ivy.xml
@@ -21,7 +21,7 @@
<dependency org="org.eclipse.osgi" name="org.eclipse.equinox.event" rev="${org.eclipse.equinox.event}" conf='compile->compile'/>
<dependency org='org.slf4j' name='com.springsource.slf4j.api' rev='${org.slf4j}' conf='compile->runtime'/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.services" rev="latest.integration" conf="compile->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.core" rev="latest.integration" conf="compile->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.core" rev="latest.integration" conf="aspects, compile->runtime"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.artifact" rev="latest.integration" conf="compile->compile"/>
<dependency org='org.slf4j' name='com.springsource.slf4j.nop' rev='${org.slf4j}' conf='test->runtime' />
<dependency org='org.eclipse.virgo.repository' name='org.eclipse.virgo.repository' rev='${org.eclipse.virgo.repository}' conf='compile->compile' />
diff --git a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/GlobalRegionTests.java b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/GlobalRegionTests.java
new file mode 100644
index 00000000..c6a6b0df
--- /dev/null
+++ b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/GlobalRegionTests.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2011 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.osgi.region;
+
+import junit.framework.Assert;
+
+import org.eclipse.equinox.region.Region;
+import org.eclipse.virgo.kernel.serviceability.Assert.FatalAssertionException;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Version;
+
+public class GlobalRegionTests {
+
+ private static final Version TEST_VERSION = Version.emptyVersion;
+
+ private static final String TEST_BUNDLE_SYMBOLIC_NAME = "a";
+
+ private static final String TEST_REGION_NAME = "test.region";
+
+ private Region region;
+
+ @Before
+ public void setUp() throws Exception {
+ this.region = new GlobalRegion(TEST_REGION_NAME);
+ }
+
+ @Test
+ public void testGetName() {
+ Assert.assertEquals(TEST_REGION_NAME, this.region.getName());
+ }
+
+ @Test(expected=UnsupportedOperationException.class)
+ public void testGetBundle() throws UnsupportedOperationException {
+ this.region.getBundle(TEST_BUNDLE_SYMBOLIC_NAME, TEST_VERSION);
+ }
+
+ @Test(expected=FatalAssertionException.class)
+ public void testGetBundleWithNullSymbolicName() throws UnsupportedOperationException {
+ this.region.getBundle(null, TEST_VERSION);
+ }
+
+ @Test(expected=FatalAssertionException.class)
+ public void testGetBundleWithNullVersion() throws UnsupportedOperationException {
+ this.region.getBundle(TEST_BUNDLE_SYMBOLIC_NAME, null);
+ }
+
+ // Other tests could be added in due course, but the point of adding this test was really to pin down bug 341012
+}

Back to the top