Package com.springsource.insight.intercept.operation

Examples of com.springsource.insight.intercept.operation.OperationMap


        if (getAspect().collectExtraInformation()) {
            assertAddresses(op, MailDefinitions.SEND_SENDERS, 1);
            assertAddresses(op, MailDefinitions.SEND_RECIPS, 3);

            OperationMap details = op.get(MailDefinitions.SEND_DETAILS, OperationMap.class);
            assertNotNull("No details extracted", details);
            assertEquals("Mismatched subject", message.getSubject(), details.get(MailDefinitions.SEND_SUBJECT, String.class));
        }
    }
View Full Code Here


                op.getType().equals(OperationCollectionTypes.RESULT_TYPE.type));

        assertTrue("Invalid result code: " + op.get("resultCode") + ", expected: input", "input".equals(op.get("resultCode")));
        assertTrue("Invalid result view: " + op.get("view") + ", expected: /register.jsp", "/register.jsp".equals(op.get("view")));

        OperationMap errs = (OperationMap) op.get("errs");
        assertTrue("Invalid fields validation errors", errs != null && errs.size() > 0 && errs.get("personBean.firstName") != null);
    }
View Full Code Here

        assertTrue("Invalid operation type: " + op.getType().getName() + ", expected: " + OperationCollectionTypes.START_TYPE.getValue(),
                op.getType().equals(OperationCollectionTypes.START_TYPE.type));

        assertTrue("Invalid action name: " + op.get("actionName") + ", expected: /register2", "/register2".equals(op.get("actionName")));

        OperationMap params = (OperationMap) op.get("params");
        assertTrue("Invalid request parameters", params != null && params.size() > 0 && params.get("personBean.lastName") != null);
    }
View Full Code Here

        assertTrue("Invalid operation type: " + op.getType().getName() + ", expected: " + OperationCollectionTypes.START_TYPE.getValue(),
                op.getType().equals(OperationCollectionTypes.START_TYPE.type));

        assertTrue("Invalid action name: " + op.get("actionName") + ", expected: /register", "/register".equals(op.get("actionName")));

        OperationMap params = (OperationMap) op.get("params");
        assertTrue("Invalid result parameters", params != null && params.size() > 0 && params.get("personBean.lastName") != null);
    }
View Full Code Here

            c.close();
        }

        Operation operation = assertJdbcOperation(sql);

        OperationMap parameters = operation.get(JdbcOperationFinalizer.PARAMS_VALUES, OperationMap.class);
        assertNotNull("Missing parameters map", parameters);
        assertEquals("Mismatched parameters count", 1, parameters.size());
        assertEquals("Mismatched parameter value", paramValue, parameters.get(paramName));
    }
View Full Code Here

    private Operation assertConnectDetails(Driver driver, String url, Properties props) {
        Operation op = assertConnectDetails(url, "create");
        assertEquals("Mismatched driver class", driver.getClass().getName(), op.get("driverClass", String.class));

        OperationMap actualParams = op.get("params", OperationMap.class);
        if (actualParams != null) {   // OK if missing - means 'collectExtraInformation' is FALSE
            OperationMap expectedParams = JdbcDriverConnectOperationCollectionAspect.addConnectionProperties(new Operation(), props);
            assertEquals("Mismatched parameters size", expectedParams.size(), actualParams.size());
            for (String key : expectedParams.keySet()) {
                Object expValue = expectedParams.get(key), actValue = actualParams.get(key);
                assertEquals("Mismatched value for parameter=" + key, expValue, actValue);
            }
        }

        return op;
View Full Code Here

        return op;
    }

    private void assertObscuredProperties(Operation op, Collection<String> obscuredKeys, boolean expectedState) {
        OperationMap params = op.get("params", OperationMap.class);
        if (params == null)
            return;

        JdbcDriverConnectOperationCollectionAspect aspectInstance = getAspect();
        ObscuredValueSetMarker obscuredValue = (ObscuredValueSetMarker) aspectInstance.getSensitiveValueMarker();
        for (String key : obscuredKeys) {
            Object value = params.get(key);
            if (value == null) {
                continue;
            }

            assertEquals("Key=" + key + " obscured state mismatch",
View Full Code Here

    @Test
    public void testExactlyTwoDifferentExternalResourceNames() {
        Operation op1 = createOperation();
        Operation op2 = createOperation();

        OperationMap map = op2.createMap(JMSPluginUtils.CONNECTION_DATA);
        map.put("host", "127.0.0.2");
        map.put("port", 1111);

        Operation dummyOp = new Operation();

        SimpleFrameBuilder builder = new SimpleFrameBuilder();
        builder.enter(new Operation().type(OperationType.HTTP));
View Full Code Here

                .sourceCodeLocation(OperationCollectionUtil.getSourceCodeLocation(jp))
                ;
    }

    protected void applyPropertiesData(Operation op, BasicProperties props) {
        OperationMap map = op.createMap("props");

        map.putAnyNonEmpty("Type", props.getType());
        map.putAnyNonEmpty("App Id", props.getAppId());
        map.putAnyNonEmpty("User Id", props.getUserId());
        map.put("Class Id", props.getClassId());
        map.putAnyNonEmpty("Reply To", props.getReplyTo());
        map.putAnyNonEmpty("Priority", props.getPriority());
        map.putAnyNonEmpty("Class Name", props.getClassName());
        map.putAnyNonEmpty("Timestamp", props.getTimestamp());
        map.putAnyNonEmpty("Message Id", props.getMessageId());
        map.putAnyNonEmpty("Expiration", props.getExpiration());
        map.putAnyNonEmpty("Content Type", props.getContentType());
        map.putAnyNonEmpty("Delivery Mode", props.getDeliveryMode());
        map.putAnyNonEmpty("Correlation Id", props.getCorrelationId());
        map.putAnyNonEmpty("Content Encoding", props.getContentEncoding());

        updateHeadersMap(op, props.getHeaders());
    }
View Full Code Here

        OperationList list = op.get(type, OperationList.class);
        assertNotNull("No addresses of type=" + type, list);
        assertEquals("Mismatched number of " + type + " addresses", expectedSize, list.size());

        for (int index = 0; index < list.size(); index++) {
            OperationMap addrEntry = list.get(index, OperationMap.class);
            assertNotNull("Missing " + type + " entry #" + index, addrEntry);

            String typeValue = addrEntry.get("type", String.class),
                    addrValue = addrEntry.get("value", String.class);
            assertEquals("Mismatched " + type + " type for entry #" + index, "rfc822", typeValue);
            assertNotNull("No " + type + " value for entry #" + index, addrValue);

            int domainIndex = addrValue.lastIndexOf('@');
            String domain = addrValue.substring(domainIndex);
View Full Code Here

TOP

Related Classes of com.springsource.insight.intercept.operation.OperationMap

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.