Package com.eviware.soapui.impl.rest.mock

Examples of com.eviware.soapui.impl.rest.mock.RestMockResponse


        addRestMockResponseToProject();

        WsdlProject reloadedProject = saveAndReloadProject(project);

        RestMockService reloadedMockService = reloadedProject.getRestMockServiceByName(restMockServiceName);
        RestMockResponse reloadedMockResponse = reloadedMockService.getMockOperationAt(0).getMockResponseAt(0);
        assertThat(reloadedMockResponse, notNullValue());
        assertThat(reloadedMockResponse.getName(), is(restMockResponseName));
        assertThat(reloadedMockResponse.getResponseContent(), is(restMockResponseContent));
    }
View Full Code Here


        RestRequest restRequest = ModelItemFactory.makeRestRequest();
        restRequest.setMethod(GET);
        restRequest.setName("REST Mock Action");
        restRequest.setPath("Resource/path/subpath");
        RestMockAction restMockAction = restMockService.addNewMockAction(restRequest);
        RestMockResponse mockResponse = restMockAction.addNewMockResponse("Response 1");
        mockResponse.setResponseContent(restMockResponseContent);
        mockResponse.setName(restMockResponseName);
    }
View Full Code Here

    public static WsdlMockResponse makeWsdlMockResponse() throws SoapUIException {
        return new WsdlMockResponse(makeWsdlMockOperation(), MockResponseConfig.Factory.newInstance());
    }

    public static RestMockResponse makeRestResponse() throws SoapUIException {
        return new RestMockResponse(makeRestMockAction(), RESTMockResponseConfig.Factory.newInstance());
    }
View Full Code Here

        MockOperation matchedOperation = mockService.findOrCreateNewOperation(restRequest);

        int responseCount = matchedOperation.getMockResponseCount() + 1;
        String responseName = "Response " + responseCount;

        RestMockResponse mockResponse = ((RestMockAction) matchedOperation).addNewMockResponse(responseName);
        // add expected response if available
        if (restRequest != null && restRequest.getResponse() != null) {
            copyResponseContent(restRequest, mockResponse);
            copyHeaders(restRequest, mockResponse);
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.rest.mock.RestMockResponse

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.