Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.RESTMockServiceConfig


        WsdlProject project = makeWsdlProject();
        return makeRestMockService(project);
    }

    public static RestMockService makeRestMockService(WsdlProject project) {
        RESTMockServiceConfig restMockServiceConfig = project.getConfig().addNewRestMockService();
        restMockServiceConfig.setName("mockServiceConfig");
        RestMockService restMockService = new RestMockService(project, restMockServiceConfig);
        project.addRestMockService(restMockService);
        return restMockService;
    }
View Full Code Here


    }

    @Test
    public void isConstructedWithActionsAndResponses() throws SoapUIException {
        Project project = ModelItemFactory.makeWsdlProject();
        RESTMockServiceConfig config = createRestMockServiceConfig();

        RestMockService mockService = new RestMockService(project, config);

        assertEquals(config.getName(), mockService.getName());
        RestMockAction mockOperation = mockService.getMockOperationAt(0);
        RestMockResponse mockResponse = mockOperation.getMockResponseAt(0);
        assertEquals("Some content", mockResponse.getResponseContent());
    }
View Full Code Here

        assertThat(mockOperation.getMethod(), is(restRequest.getMethod()));
        assertTrue(mockOperation.getResourcePath().contains("/full/path"));
    }

    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");
View Full Code Here

TOP

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

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.