summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2011-03-07 23:33:51 (EST)
committer Glyn Normington2011-03-07 23:33:51 (EST)
commit872a13f91cbb586989e73b7776dcf992a6f7c48b (patch)
treee223e89e48e2d358677d479b87ba7e5875f2a067
parentdc7d216df31491d88c3591cf47e76ed754b89a5b (diff)
downloadorg.eclipse.virgo.kernel-872a13f91cbb586989e73b7776dcf992a6f7c48b.zip
org.eclipse.virgo.kernel-872a13f91cbb586989e73b7776dcf992a6f7c48b.tar.gz
org.eclipse.virgo.kernel-872a13f91cbb586989e73b7776dcf992a6f7c48b.tar.bz2
test fixes.
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/BundleIdBasedRegionTests.java6
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionDigraphTests.java6
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionFilterTests.java4
3 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/BundleIdBasedRegionTests.java b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/BundleIdBasedRegionTests.java
index a868ba2..e81a525 100644
--- a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/BundleIdBasedRegionTests.java
+++ b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/BundleIdBasedRegionTests.java
@@ -79,7 +79,7 @@ public class BundleIdBasedRegionTests {
this.mockRegion = EasyMock.createMock(Region.class);
this.mockRegion2 = EasyMock.createMock(Region.class);
- this.mockRegionFilter = EasyMock.createMock(RegionFilter.class);
+ this.mockRegionFilter = new RegionFilter();
this.regionIterator = new Iterator<Region>() {
@@ -103,12 +103,12 @@ public class BundleIdBasedRegionTests {
}
private void replayMocks() {
- EasyMock.replay(this.mockBundleContext, this.mockBundle, this.mockRegion, this.mockRegion2, this.mockRegionFilter, this.mockGraph);
+ EasyMock.replay(this.mockBundleContext, this.mockBundle, this.mockRegion, this.mockRegion2, this.mockGraph);
}
@After
public void tearDown() throws Exception {
- EasyMock.verify(this.mockBundleContext, this.mockBundle, this.mockRegion, this.mockRegion2, this.mockRegionFilter, this.mockGraph);
+ EasyMock.verify(this.mockBundleContext, this.mockBundle, this.mockRegion, this.mockRegion2, this.mockGraph);
}
@Test
diff --git a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionDigraphTests.java b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionDigraphTests.java
index cb96921..7038b57 100644
--- a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionDigraphTests.java
+++ b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionDigraphTests.java
@@ -85,17 +85,17 @@ public class StandardRegionDigraphTests {
private void setMockFilterAllowedBundle(RegionFilter regionFilter, OrderedPair<String, Version> bundle) throws InvalidSyntaxException {
String filter = "(&(" +
RegionFilter.VISIBLE_BUNDLE_NAMESPACE + "=" + bundle.getFirst() + ")(" +
- Constants.BUNDLE_VERSION_ATTRIBUTE + "=" + bundle.getSecond();
+ Constants.BUNDLE_VERSION_ATTRIBUTE + "=" + bundle.getSecond() + "))";
regionFilter.setFilters(RegionFilter.VISIBLE_BUNDLE_NAMESPACE, Arrays.asList(filter));
}
private void replayMocks() {
- EasyMock.replay(this.mockRegion1, this.mockRegion2, this.mockRegion3, this.regionFilter1, this.regionFilter2, this.mockBundle);
+ EasyMock.replay(this.mockRegion1, this.mockRegion2, this.mockRegion3, this.mockBundle);
}
@After
public void tearDown() throws Exception {
- EasyMock.verify(this.mockRegion1, this.mockRegion2, this.mockRegion3, this.regionFilter1, this.regionFilter2, this.mockBundle);
+ EasyMock.verify(this.mockRegion1, this.mockRegion2, this.mockRegion3, this.mockBundle);
}
@Test
diff --git a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionFilterTests.java b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionFilterTests.java
index 27b1e9a..7a065e0 100644
--- a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionFilterTests.java
+++ b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/internal/StandardRegionFilterTests.java
@@ -56,7 +56,7 @@ public class StandardRegionFilterTests {
private void addBundleFilter(String bundleSymbolicName, Version bundleVersion) throws InvalidSyntaxException {
String filter = "(&(" +
RegionFilter.VISIBLE_BUNDLE_NAMESPACE + "=" + bundleSymbolicName + ")(" +
- Constants.BUNDLE_VERSION_ATTRIBUTE + ">=" + bundleVersion;
+ Constants.BUNDLE_VERSION_ATTRIBUTE + ">=" + bundleVersion + "))";
regionFilter.setFilters(RegionFilter.VISIBLE_BUNDLE_NAMESPACE, Arrays.asList(filter));
}
@@ -87,7 +87,7 @@ public class StandardRegionFilterTests {
@Test
public void testSetServiceFilter() throws InvalidSyntaxException {
this.regionFilter.setFilters(RegionFilter.VISIBLE_SERVICE_NAMESPACE, Arrays.asList(serviceImportPolicy));
- assertEquals(Arrays.asList(this.packageImportPolicy), this.regionFilter.getFilters(RegionFilter.VISIBLE_SERVICE_NAMESPACE));
+ assertEquals(Arrays.asList(serviceImportPolicy), this.regionFilter.getFilters(RegionFilter.VISIBLE_SERVICE_NAMESPACE));
}
}