Package org.apache.felix.http.whiteboard.internal.manager.HttpContextManager

Examples of org.apache.felix.http.whiteboard.internal.manager.HttpContextManager.HttpContextHolder


    @Test
    public void test_HttpContextHolder()
    {
        TestCase.assertNotNull(sampleContext);

        final HttpContextHolder h1 = new HttpContextHolder(sampleContext);
        TestCase.assertSame(sampleContext, h1.getContext());
        TestCase.assertTrue(h1.getMappings().isEmpty());

        ServletMapping sm = new ServletMapping(bundle1, null, "");
        h1.addMapping(sm);
        TestCase.assertSame(sampleContext, sm.getContext());
        TestCase.assertEquals(1, h1.getMappings().size());
        TestCase.assertTrue(h1.getMappings().contains(sm));

        h1.removeMapping(sm);
        TestCase.assertNull(sm.getContext());
        TestCase.assertTrue(h1.getMappings().isEmpty());
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.http.whiteboard.internal.manager.HttpContextManager.HttpContextHolder

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.