Package com.eviware.soapui.model.mock

Examples of com.eviware.soapui.model.mock.MockOperation


        return bestMatchedOperation;
    }

    private MockOperation getBestMatchedOperation(MockOperation currentBestMatchedOperation, MockOperation operation, String operationPath) {
        MockOperation bestMatchedOperation = currentBestMatchedOperation;

        if (bestMatchedOperation == null || foundBetterMatch((RestMockAction) bestMatchedOperation, operationPath)) {
            bestMatchedOperation = operation;
        }
        return bestMatchedOperation;
View Full Code Here


    }

    public void perform(MockResponse mockResponse, Object param) {
        if (UISupport.confirm("Delete MockResponse [" + mockResponse.getName() + "] from MockOperation ["
                + mockResponse.getMockOperation().getName() + "]", getName())) {
            MockOperation operation = mockResponse.getMockOperation();
            operation.removeMockResponse(mockResponse);
        }
    }
View Full Code Here

    public static boolean hasDependingMockOperations(WsdlInterface iface) {
        for (int c = 0; c < iface.getProject().getMockServiceCount(); c++) {
            MockService mockService = iface.getProject().getMockServiceAt(c);
            for (int i = 0; i < mockService.getMockOperationCount(); i++) {
                MockOperation mockOperation = mockService.getMockOperationAt(i);
                if (mockOperation.getOperation().getInterface() == iface) {
                    return true;
                }
            }
        }
View Full Code Here

        String defaultName = "REST MockService " + (project.getRestMockServiceCount() + 1);
        return UISupport.prompt("Enter name of new MockService", title, defaultName);
    }

    private void addRequestToMockService(RestRequest restRequest, RestMockService mockService) {
        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) {
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.mock.MockOperation

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.