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

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


        RestMockService restMockService = project.addNewRestMockService(restMockServiceName);
        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


        return new RestService(makeWsdlProject(), RestServiceConfig.Factory.newInstance());
    }

    public static RestMockAction makeRestMockAction() throws SoapUIException {
        RestMockService mockService = makeRestMockService();
        RestMockAction restMockAction = new RestMockAction(mockService, mockService.getConfig().addNewRestMockAction());
        mockService.addMockOperation(restMockAction);
        return restMockAction;
    }
View Full Code Here

    private void assertMockActionWithPath(RestMockService restMockService, String expectedPath) {
        boolean foundMatch = false;

        for (MockOperation mockOperation : restMockService.getMockOperationList()) {
            RestMockAction mockAction = (RestMockAction) mockOperation;

            if (mockAction.getResourcePath().equals(expectedPath)) {
                foundMatch = true;
                break;
            }
        }
        assertTrue("Did not find a match for " + expectedPath, foundMatch);
View Full Code Here

TOP

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

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.