Examples of MyApplicationListenerAndRepository


Examples of il.co.springsource.insight.MyApplicationListenerAndRepository

        ctx.registerSingleton("myListener", MyApplicationListener.class);
        ctx.registerSingleton("myListenerAndRepo", MyApplicationListenerAndRepository.class);
        ctx.refresh();

        MyApplicationListener listener = ctx.getBean(MyApplicationListener.class);
        MyApplicationListenerAndRepository listenerAndRepo = ctx.getBean(MyApplicationListenerAndRepository.class);

        MyEvent event = new MyEvent("fubar");
        ctx.publishEvent(event);
        assertSame("Mismatched listener event", event, listener.getLastEvent());
        assertSame("Mismatched listener&repo event", event, listenerAndRepo.getLastEvent());

        List<Operation> opsList = ((OperationListCollector) spiedOperationCollector).getCollectedOperations();
        assertEquals("Mismatched number of collected operations", 2, ListUtil.size(opsList));

        @SuppressWarnings("unchecked")
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.