Package org.apache.felix.http.jetty.internal.JettyService

Examples of org.apache.felix.http.jetty.internal.JettyService.Deployment


     * @throws InterruptedException
     */
    public void testInitBundleContextDeployIT() throws MalformedURLException, InterruptedException
    {
        //Setup mocks
        Deployment mockDeployment = mock(Deployment.class);
        Bundle mockBundle = mock(Bundle.class);
        BundleContext mockBundleContext = mock(BundleContext.class);

        //Setup behaviors
        when(mockDeployment.getBundle()).thenReturn(mockBundle);
        when(mockBundle.getBundleContext()).thenReturn(mockBundleContext);
        when(mockBundle.getSymbolicName()).thenReturn("test");
        when(mockBundle.getVersion()).thenReturn(new Version("0.0.1"));

        Dictionary<String, String> headerProperties = new Hashtable<String, String>();
        headerProperties.put("Web-ContextPath", "test");
        when(mockBundle.getHeaders()).thenReturn(headerProperties);
        when(mockDeployment.getContextPath()).thenReturn("test");
        when(mockBundle.getEntry("/")).thenReturn(new URL("http://www.apache.com"));
        when(mockBundle.getState()).thenReturn(Bundle.ACTIVE);

        EnumSet<DispatcherType> dispatcherSet = EnumSet.allOf(DispatcherType.class);
        dispatcherSet.add(DispatcherType.REQUEST);
View Full Code Here

TOP

Related Classes of org.apache.felix.http.jetty.internal.JettyService.Deployment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.