Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Auge2015-02-24 04:27:45 +0000
committerRaymond Auge2015-02-24 04:27:45 +0000
commit8ecd23782acbfad658b99f3ca46c6acaae2ebb7a (patch)
treec3808a46273474a7a42388d00912f28e97943918 /bundles/org.eclipse.equinox.http.servlet.tests/src
parent5b3a8bcf8b69c1d54e6b7782dfab1741137f8ef9 (diff)
downloadrt.equinox.bundles-8ecd23782acbfad658b99f3ca46c6acaae2ebb7a.tar.gz
rt.equinox.bundles-8ecd23782acbfad658b99f3ca46c6acaae2ebb7a.tar.xz
rt.equinox.bundles-8ecd23782acbfad658b99f3ca46c6acaae2ebb7a.zip
Bug 460639 - tests
Diffstat (limited to 'bundles/org.eclipse.equinox.http.servlet.tests/src')
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
index 7405947d9..383153e42 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
@@ -1133,6 +1133,26 @@ public class ServletTest extends TestCase {
Assert.assertEquals(expected, actual);
}
+ public void test_ServletContextHelper1() throws Exception {
+ Bundle bundle = installBundle(ServletTest.TEST_BUNDLE_1);
+ try {
+ bundle.start();
+ BundleContext bundleContext = getBundleContext();
+ ServiceReference<HttpServiceRuntime> serviceReference =
+ bundleContext.getServiceReference(HttpServiceRuntime.class);
+ HttpServiceRuntime runtime = bundleContext.getService(serviceReference);
+
+ RuntimeDTO runtimeDTO = runtime.getRuntimeDTO();
+ Assert.assertEquals(4, runtimeDTO.failedServletContextDTOs.length);
+ bundle.stop();
+
+ runtimeDTO = runtime.getRuntimeDTO();
+ Assert.assertEquals(0, runtimeDTO.failedServletContextDTOs.length);
+ } finally {
+ uninstallBundle(bundle);
+ }
+ }
+
public void test_ServletContextHelper7() throws Exception {
String expected = "a";
@@ -1146,6 +1166,7 @@ public class ServletTest extends TestCase {
try {
Dictionary<String, String> contextProps = new Hashtable<String, String>();
contextProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, "a");
+ contextProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/");
registrations.add(bundleContext.registerService(ServletContextHelper.class, servletContextHelper, contextProps));
Dictionary<String, String> servletProps = new Hashtable<String, String>();

Back to the top