Examples of SourceCodeLocation


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

     * 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

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

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

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

        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

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

     * 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

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

         */
        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

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

     * 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

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

        
         *  (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
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.