Package com.springsource.insight.intercept.operation

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


        Class<?> txClass = aspectInstance.getTransactionClass();
        assertEquals(testName + ": Mismatched full class name", txClass.getName(), op.get(OperationFields.CLASS_NAME, String.class));
        assertEquals(testName + ": Mismatched short class name", txClass.getSimpleName(), op.get(OperationFields.SHORT_CLASS_NAME, String.class));
        assertEquals(testName + ": Mismatched action", action, op.get(JtaDefinitions.ACTION_ATTR, String.class));

        SourceCodeLocation scl = new SourceCodeLocation(op.get(OperationFields.CLASS_NAME, String.class),
                op.get(OperationFields.METHOD_NAME, String.class),
                (-1));
        assertEquals(testName + ": Mismatched method signature",
                JoinPointBreakDown.getMethodStringFromArgs(scl, argTypes),
                op.get(OperationFields.METHOD_SIGNATURE, String.class));
View Full Code Here


     * This tests that Integration Operations can be rendered via the FreeMarker
     * template.
     */
    @Test
    public void testLocalViewWithStatus() throws Exception {
        SourceCodeLocation scl = new SourceCodeLocation("MyClass", "methodName", 45);
        Message<String> message = new GenericMessage<String>("TestMessage");
        String beanName = "testChannel";
        String beanType = "Channel";
        Operation operation = new Operation()
                .type(getOperationType())
                .sourceCodeLocation(scl)
                .label(beanName + "#" + scl.getMethodName() + "()")
                .put("siComponentType", beanType)
                .put("beanName", beanName)
                .put("payloadType", "java.lang.String")
                .put("idHeader", message.getHeaders().getId().toString());

View Full Code Here

    @Before
    public void setUp() {
        grailsOp = new Operation()
                .type(GrailsControllerMethodEndPointAnalyzer.TYPE)
                .label("MyController#myAction")
                .sourceCodeLocation(new SourceCodeLocation("org.shortController", "myAction", 111))
        ;
    }
View Full Code Here

        testController.handleRequest(null, null);

        Operation op = assertEncodeReturnModelValues(testController);
        assertControllerView(op, testController.returnView);

        SourceCodeLocation source = op.getSourceCodeLocation();
        assertEquals("Mismatched source class", ExampleController.class.getName(), source.getClassName());
        assertEquals("Mismatched method name", "handleRequest", source.getMethodName());
    }
View Full Code Here

     * This tests that {@link CashMoneyOperation} can be rendered via the FreeMarker
     * template.
     */
    @Test
    public void testLocalViewWithStatus() throws Exception {
        SourceCodeLocation scl = new SourceCodeLocation("MyClass", "methodName", 45);
        Operation operation = new Operation()
                .type(TYPE)
                .sourceCodeLocation(scl)
                .label("Cash Balance Set: " + 1002)
                .put("newBalance", 1002);
View Full Code Here

         */
        assertEquals("Mismatched operation type", CashMoneyOperationCollectionAspect.TYPE, op.getType());
        assertEquals("Mismatched balance value", 42, op.getInt("newBalance", (-1)));
        assertEquals("Mismatched label", "Cash Balance Set: 42", op.getLabel());

        SourceCodeLocation scl = op.getSourceCodeLocation();
        assertEquals("Mismatched source code class", DummyAccount.class.getName(), scl.getClassName());
        assertEquals("Mismatched source code method", "setBalance", scl.getMethodName());
    }
View Full Code Here

     * This tests that Integration Operations can be rendered via the FreeMarker
     * template.
     */
    @Test
    public void testLocalViewWithStatus() throws Exception {
        SourceCodeLocation scl = new SourceCodeLocation("MyClass", "methodName", 45);
        Message<String> message = new GenericMessage<String>("TestMessage");
        String beanName = "testChannel";
        String beanType = "Channel";
        Operation operation = new Operation()
                .type(getOperationType())
                .sourceCodeLocation(scl)
                .label(beanName + "#" + scl.getMethodName() + "()")
                .put("siComponentType", beanType)
                .put("beanName", beanName)
                .put("payloadType", "java.lang.String")
                .put("idHeader", message.getHeaders().getId().toString());

View Full Code Here

        
         *  (2) state.fullControllerName may be null if GrailsControllerStateKeeper.setThreadLocalController
         *  not called
         */
        if ((state != null) && (state.fullControllerName != null)) {
            return new SourceCodeLocation(state.fullControllerName, actionName, 1);
        } else {
            return new SourceCodeLocation(UNKNOWN_CONTROLLER, actionName, 1);
        }
    }
View Full Code Here

TOP

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

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.