Package com.eviware.soapui.impl.wsdl.submit.transports.http

Examples of com.eviware.soapui.impl.wsdl.submit.transports.http.ExtendedHttpMethod


        restRequest.submit(submitContext, false);
        return submitContext;
    }

    private SinglePartHttpResponse makeResponseFor(RestRequest restRequest, String path) throws Exception {
        ExtendedHttpMethod httpMethod = prepareHttpMethodWith(path);
        SinglePartHttpResponse response =
                new SinglePartHttpResponse(restRequest, httpMethod, null, mock(PropertyExpansionContext.class));
        response.setResponseContent("{ firstName: 'Kalle', secondName: 'Ek' }");
        return response;
    }
View Full Code Here


        response.setResponseContent("{ firstName: 'Kalle', secondName: 'Ek' }");
        return response;
    }

    private ExtendedHttpMethod prepareHttpMethodWith(String path) throws URISyntaxException, MalformedURLException {
        ExtendedHttpMethod httpMethod = mock(ExtendedHttpMethod.class);
        when(httpMethod.getResponseContentType()).thenReturn("text/json");
        when(httpMethod.getMethod()).thenReturn("GET");
        when(httpMethod.getProtocolVersion()).thenReturn(new ProtocolVersion("http", 1, 1));
        SoapUIMetrics soapUIMetrics = new SoapUIMetrics(mock(HttpTransportMetrics.class),
                mock(HttpTransportMetrics.class));
        when(httpMethod.getMetrics()).thenReturn(soapUIMetrics);
        when(httpMethod.getAllHeaders()).thenReturn(new Header[0]);
        when(httpMethod.getResponseReadTime()).thenReturn(10L);
        when(httpMethod.getURI()).thenReturn(new java.net.URI(ENDPOINT + path));
        when(httpMethod.getURL()).thenReturn(new java.net.URL(ENDPOINT + path));
        return httpMethod;
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.submit.transports.http.ExtendedHttpMethod

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.