Package com.eviware.soapui.impl.support

Examples of com.eviware.soapui.impl.support.AbstractHttpRequest$RequestIconAnimator


    }

    @Test
    public void processesRequestCorrectly() throws Exception {
        StringToStringsMap emptyHeaders = new StringToStringsMap();
        AbstractHttpRequest request = prepareRequestWithHeaders(emptyHeaders);
        SubmitContext submitContext = new StubbedSubmitContext(request);

        httpTransport.sendRequest(submitContext, request);
        assertThat(methodExecuted, is(notNullValue()));
        assertThat(contextUsed, is(notNullValue()));
View Full Code Here


    @Test
    public void expandsPropertiesInHeaderName() throws Exception {
        StringToStringsMap headers = new StringToStringsMap();
        String headerValue = "The value";
        headers.add("Header-for-${request}", headerValue);
        AbstractHttpRequest request = prepareRequestWithHeaders(headers);
        SubmitContext submitContext = new StubbedSubmitContext(request);
        String requestName = "Fin-fin request";
        submitContext.setProperty("request", requestName);

        httpTransport.sendRequest(submitContext, request);
View Full Code Here

        assertThat(modifiedHeaders[0].getName(), is(expectedHeaderName));
        assertThat(modifiedHeaders[0].getValue(), is(headerValue));
    }

    private AbstractHttpRequest prepareRequestWithHeaders(StringToStringsMap headers) {
        AbstractHttpRequest request = mock(AbstractHttpRequest.class);
        when(request.getRequestHeaders()).thenReturn(headers);
        XmlBeansSettingsImpl emptySettings = mock(XmlBeansSettingsImpl.class);
        when(request.getSettings()).thenReturn(emptySettings);
        return request;
    }
View Full Code Here

        submitContext = createSubmitContext();
    }

    @Test
    public void performsPropertyExpansionOnWsdlTestRequestContent() throws SoapUIException {
        AbstractHttpRequest request = mockRequest(WsdlTestRequest.class);

        requestFilter.filterAbstractHttpRequest(submitContext, request);

        String contentAfterPropertyExpansion = (String) submitContext.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT);
        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
View Full Code Here

        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }

    @Test
    public void performsPropertyExpansionOnRestTestRequestContent() throws SoapUIException {
        AbstractHttpRequest request = mockRequest(RestTestRequest.class);
        requestFilter.filterAbstractHttpRequest(submitContext, request);

        String contentAfterPropertyExpansion = (String) submitContext.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT);
        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }
View Full Code Here

        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }

    @Test
    public void performsPropertyExpansionOnHttpTestRequestContent() throws SoapUIException {
        AbstractHttpRequest request = mockRequest(HttpTestRequest.class);
        requestFilter.filterAbstractHttpRequest(submitContext, request);

        String contentAfterPropertyExpansion = (String) submitContext.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT);
        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }
View Full Code Here

        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }

    @Test
    public void performsPropertyExpansionOnWsdlRequestContent() throws SoapUIException {
        AbstractHttpRequest request = mockRequest(WsdlRequest.class);
        requestFilter.filterAbstractHttpRequest(submitContext, request);

        String contentAfterPropertyExpansion = (String) submitContext.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT);
        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }
View Full Code Here

        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }

    @Test
    public void performsPropertyExpansionOnRestRequestContent() throws SoapUIException {
        AbstractHttpRequest request = mockRequest(RestRequest.class);
        requestFilter.filterAbstractHttpRequest(submitContext, request);

        String contentAfterPropertyExpansion = (String) submitContext.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT);
        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }
View Full Code Here

        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }

    @Test
    public void performsPropertyExpansionOnHttpRequestContent() throws SoapUIException {
        AbstractHttpRequest request = mockRequest(HttpRequest.class);
        requestFilter.filterAbstractHttpRequest(submitContext, request);

        String contentAfterPropertyExpansion = (String) submitContext.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT);
        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }
View Full Code Here

        context.setProperty(BaseHttpRequestTransport.REQUEST_CONTENT, REQUEST_CONTENT);
        return context;
    }

    private <T extends AbstractHttpRequest> AbstractHttpRequest mockRequest(Class<T> type) {
        AbstractHttpRequest request = Mockito.mock(type);
        XmlBeansSettingsImpl settings = Mockito.mock(XmlBeansSettingsImpl.class);
        Mockito.when(settings.getBoolean(CommonSettings.ENTITIZE_PROPERTIES)).thenReturn(false);
        Mockito.when(request.getSettings()).thenReturn(settings);
        return request;
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.support.AbstractHttpRequest$RequestIconAnimator

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.