diff options
author | Thomas Watson | 2016-11-17 19:18:11 +0000 |
---|---|---|
committer | Thomas Watson | 2016-11-17 19:18:11 +0000 |
commit | 352908fa44436a6421b938347ed745e23d6a441d (patch) | |
tree | f6e14c3a8f421281e3165ee7462202edde66e371 /bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container | |
parent | 33ad3dfc7cca7bab93f67c53c8b288bafb251347 (diff) | |
download | rt.equinox.framework-352908fa44436a6421b938347ed745e23d6a441d.tar.gz rt.equinox.framework-352908fa44436a6421b938347ed745e23d6a441d.tar.xz rt.equinox.framework-352908fa44436a6421b938347ed745e23d6a441d.zip |
Bug 507703 - Add toString to ModuleWiringY20161124-1000I20161128-2000I20161128-0600I20161128-0330I20161127-2000I20161127-1300I20161126-2000I20161126-0815I20161125-2000I20161124-2000I20161123-2000I20161122-2000I20161121-2000I20161120-2000I20161119-2000I20161118-2000I20161117-2000
Change-Id: I4067437e5da201f472c48173a2595e63bb589177
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container')
-rw-r--r-- | bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java index ef48e85a8..e26a78c0d 100644 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java @@ -2563,7 +2563,7 @@ public class TestModuleContainer extends AbstractTest { } @Test - public void testStartLevelDeadlock() throws BundleException, IOException, InterruptedException { + public void testStartLevelDeadlock() throws BundleException, IOException { DummyContainerAdaptor adaptor = createDummyAdaptor(); ModuleContainer container = adaptor.getContainer(); container.getFrameworkStartLevel().setInitialBundleStartLevel(2); @@ -2625,7 +2625,7 @@ public class TestModuleContainer extends AbstractTest { } @Test - public void testUnresolvedHostWithFragmentCycle() throws BundleException, IOException { + public void testUnresolvedHostWithFragmentCycle() throws BundleException { DummyContainerAdaptor adaptor = createDummyAdaptor(); ModuleContainer container = adaptor.getContainer(); @@ -2662,7 +2662,26 @@ public class TestModuleContainer extends AbstractTest { ResolutionReport report = container.resolve(Arrays.asList(hostImporter), true); Assert.assertNull("Failed to resolve test.", report.getResolutionException()); + } + + @Test + public void testModuleWiringToString() throws BundleException { + DummyContainerAdaptor adaptor = createDummyAdaptor(); + ModuleContainer container = adaptor.getContainer(); + + // install a test module + Map<String, String> testManifest = new HashMap<String, String>(); + testManifest.put(Constants.BUNDLE_MANIFESTVERSION, "2"); + testManifest.put(Constants.BUNDLE_SYMBOLICNAME, "test.name"); + testManifest.put(Constants.BUNDLE_VERSION, "1.0"); + Module testModule = installDummyModule(testManifest, "host10", container); + + ResolutionReport report = container.resolve(Arrays.asList(testModule), true); + Assert.assertNull("Failed to resolve test.", report.getResolutionException()); + ModuleRevision revision = testModule.getCurrentRevision(); + ModuleWiring wiring = revision.getWiring(); + Assert.assertEquals("Unexpected wiring.toString()", revision.toString(), wiring.toString()); } @Test |