Package org.littleshoot.proxy

Examples of org.littleshoot.proxy.DefaultHttpProxyServer.stop()


        File file = new File(FTP_ROOT_DIR + "/hello.txt");
        assertTrue("File should exist: " + file, file.exists());
        assertEquals("Hello World", context.getTypeConverter().convertTo(String.class, file));
       
        proxyServer.stop();
    }

    @Test
    public void testSftpSimpleSubPathProduceThroughProxy() throws Exception {
        if (!canTest()) {
View Full Code Here


        File file = new File(FTP_ROOT_DIR + "/mysub/bye.txt");
        assertTrue("File should exist: " + file, file.exists());
        assertEquals("Bye World", context.getTypeConverter().convertTo(String.class, file));

        proxyServer.stop();
    }

    @Test
    public void testSftpSimpleTwoSubPathProduceThroughProxy() throws Exception {
        if (!canTest()) {
View Full Code Here

        File file = new File(FTP_ROOT_DIR + "/mysub/myother/farewell.txt");
        assertTrue("File should exist: " + file, file.exists());
        assertEquals("Farewell World", context.getTypeConverter().convertTo(String.class, file));

        proxyServer.stop();
    }

    @Override
    protected JndiRegistry createRegistry() throws Exception {
        JndiRegistry jndi = super.createRegistry();
View Full Code Here

       
        context.startRoute("foo");

        assertMockEndpointsSatisfied();
       
        proxyServer.stop();
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

            // check that our little proxy server really handled a request
            assertNotNull(proxiedRequestRememberer.getLastProxiedRequest());
           
            runDefaultChecks(curi, "requestLine");
        } finally {
            httpProxyServer.stop();
        }
    }
   
    public void testHttpProxyAuth() throws Exception {
        ProxiedRequestRememberer proxiedRequestRememberer = new ProxiedRequestRememberer();
View Full Code Here

            assertTrue(requestString.contains("Proxy-Connection: close\r\n"));
            assertNotNull(curi.getHttpResponseHeader("Via"));
            assertNotNull(proxiedRequestRememberer.getLastProxiedRequest());
            runDefaultChecks(curi, "requestLine");
        } finally {
            httpProxyServer.stop();
        }
    }
   
    public void testMaxFetchKBSec() throws Exception {
        CrawlURI curi = makeCrawlURI("http://localhost:7777/200k");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.