Examples of MockOperation


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

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

    }

    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

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

    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

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

        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

Examples of org.apache.directory.server.core.MockOperation

        MaxImmSubFilter filter = new MaxImmSubFilter( schemaManager );
        Collection<ACITuple> tuples = new ArrayList<ACITuple>();
        tuples.add( new ACITuple( EMPTY_USER_CLASS_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS,
            EMPTY_MICRO_OPERATION_SET, true, 0 ) );

        AciContext aciContext = new AciContext( schemaManager, new MockOperation( schemaManager, 1 ) );
        aciContext.setEntryDn( ENTRY_NAME );
        aciContext.setAciTuples( tuples );
        aciContext.setEntry( ENTRY );

        assertEquals( 1, filter.filter( aciContext, OperationScope.ENTRY, null ).size() );

        aciContext = new AciContext( schemaManager, new MockOperation( schemaManager, 3 ) );
        aciContext.setEntryDn( ENTRY_NAME );
        aciContext.setAciTuples( tuples );
        aciContext.setEntry( ENTRY );

        assertEquals( 0, filter.filter( aciContext, OperationScope.ENTRY, null ).size() );
View Full Code Here

Examples of org.jboss.as.cli.completion.mock.MockOperation

    public OperationNameCompletionTestCase() {

        MockNode root = new MockNode("root");

        MockOperation op = new MockOperation("operation-no-properties");
        root.addOperation(op);

        op = new MockOperation("operation-property-a");
        root.addOperation(op);

        op = new MockOperation("operation-properties-a-b");
        root.addOperation(op);

        ctx = new MockCommandContext();
        ctx.setOperationCandidatesProvider(new MockOperationCandidatesProvider(root));
        completer = new OperationRequestCompleter();
View Full Code Here

Examples of org.jboss.as.cli.completion.mock.MockOperation

    public PropertiesCompletionTestCase() {

        MockNode root = new MockNode("root");

        MockOperation op = new MockOperation("operation-no-properties");
        root.addOperation(op);

        op = new MockOperation("operation-properties-one-two-three");
        op.setPropertyNames(Arrays.asList("one", "two", "three"));
        root.addOperation(op);

        ctx = new MockCommandContext();
        ctx.setOperationCandidatesProvider(new MockOperationCandidatesProvider(root));
        completer = new OperationRequestCompleter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.