Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.RESTMockResponseConfig


    private RESTMockServiceConfig createRestMockServiceConfig() {
        RESTMockServiceConfig config = RESTMockServiceConfig.Factory.newInstance();
        config.setName("Da service");
        RESTMockActionConfig mockActionConfig = config.addNewRestMockAction();
        mockActionConfig.setName("Da action");
        RESTMockResponseConfig mockResponseConfig = mockActionConfig.addNewResponse();
        mockResponseConfig.setName("Da response");
        CompressedStringConfig responseContent = CompressedStringConfig.Factory.newInstance();
        responseContent.setStringValue("Some content");
        mockResponseConfig.setResponseContent(responseContent);
        return config;
    }
View Full Code Here


    }

    public RestMockResponse addNewMockResponse(String name) {

        RESTMockResponseConfig restMockResponseConfig = getConfig().addNewResponse();
        restMockResponseConfig.setName(name);

        RestMockResponse mockResponse = new RestMockResponse(this, restMockResponseConfig);
        addMockResponse(mockResponse);


        if (getMockResponseCount() == 1 && restMockResponseConfig.getResponseContent() != null) {
            setDefaultResponse(restMockResponseConfig.getResponseContent().toString());
        }

        (getMockService()).fireMockResponseAdded(mockResponse);
        notifyPropertyChanged("mockResponses", null, mockResponse);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.RESTMockResponseConfig

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.