Package com.eviware.soapui.impl.wsdl.mock.dispatch

Examples of com.eviware.soapui.impl.wsdl.mock.dispatch.ScriptMockOperationDispatcher


    @Test
    public void testResponsesAreDispatchedWithScript() throws Exception {
        mockAction.addNewMockResponse("response 2");

        mockAction.setDispatcher(new ScriptMockOperationDispatcher(mockAction));
        mockAction.setScript("return 'response 2'");

        RestMockResult mockResult = mockAction.dispatchRequest(restMockRequest);
        assertThat(mockResult.getMockResponse().getName(), is("response 2"));
View Full Code Here


    @Test
    public void testResponsesScriptDispatchingHasDefaultResponse() throws Exception {
        mockAction.addNewMockResponse("response 2");

        mockAction.setDispatcher(new ScriptMockOperationDispatcher(mockAction));
        mockAction.setDefaultResponse("response 2");
        mockAction.setScript("return 'absent response'");

        RestMockResult mockResult = mockAction.dispatchRequest(restMockRequest);
        assertThat(mockResult.getMockResponse().getName(), is("response 2"));
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.mock.dispatch.ScriptMockOperationDispatcher

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.