Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2011-05-13 06:37:14 -0400
committerChristopher Frost2011-05-13 06:37:14 -0400
commitb0f8f42c7c899c1a3f55117b42d533105444ff6f (patch)
tree48c2b5833abc81340d113c9d1ac92b9f5c66e096 /org.eclipse.virgo.kernel.model
parentaf6790d661aa64212f494b6ebffdaf98901f012c (diff)
downloadorg.eclipse.virgo.kernel-b0f8f42c7c899c1a3f55117b42d533105444ff6f.tar.gz
org.eclipse.virgo.kernel-b0f8f42c7c899c1a3f55117b42d533105444ff6f.tar.xz
org.eclipse.virgo.kernel-b0f8f42c7c899c1a3f55117b42d533105444ff6f.zip
Tidy up of test code to remove compiler warning.
Diffstat (limited to 'org.eclipse.virgo.kernel.model')
-rw-r--r--org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/AbztractArtifactTests.java3
-rw-r--r--org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/BundleDependencyDeterminerTests.java5
2 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/AbztractArtifactTests.java b/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/AbztractArtifactTests.java
index a99ff9a5..c7c46de7 100644
--- a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/AbztractArtifactTests.java
+++ b/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/AbztractArtifactTests.java
@@ -103,13 +103,12 @@ public class AbztractArtifactTests {
assertEquals("test-region", artifact.getRegion().getName());
}
- @SuppressWarnings("unchecked")
@Test
public void getDependents() {
assertEquals(0, artifact.getDependents().size());
DependencyDeterminer determiner = createMock(DependencyDeterminer.class);
- Dictionary properties = new Hashtable();
+ Dictionary<String, String> properties = new Hashtable<String, String>();
properties.put("artifactType", "test-type");
bundleContext.registerService(DependencyDeterminer.class.getCanonicalName(), determiner, properties);
diff --git a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/BundleDependencyDeterminerTests.java b/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/BundleDependencyDeterminerTests.java
index 15e80978..e2e5afab 100644
--- a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/BundleDependencyDeterminerTests.java
+++ b/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/BundleDependencyDeterminerTests.java
@@ -101,15 +101,16 @@ public class BundleDependencyDeterminerTests {
expect(bundle2.getVersion()).andReturn(Version.emptyVersion);
expect(bundle2.getBundleId()).andReturn(100l);
expect(regionDigraph.getRegion(100l)).andReturn(regionB);
+ expect(regionB.getName()).andReturn("regionB-name").anyTimes();
expect(bundle2.getImportPackages()).andReturn(new ArrayList<QuasiImportPackage>());
- replay(quasiFrameworkFactory, regionDigraph, framework, bundle1, bundle2);
+ replay(quasiFrameworkFactory, regionDigraph, framework, bundle1, bundle2, regionB);
Set<Artifact> dependents = this.determiner.getDependents(new StubCompositeArtifact("bundle", "bundle", regionB));
assertEquals(Collections.<Artifact> emptySet(), dependents);
- verify(quasiFrameworkFactory, regionDigraph, framework, bundle1, bundle2);
+ verify(quasiFrameworkFactory, regionDigraph, framework, bundle1, bundle2, regionB);
}
private List<QuasiBundle> getTestBundleSet(){

Back to the top