1 17 package org.apache.servicemix.components.pojo; 18 19 import org.apache.servicemix.components.util.PojoLifecycleAdaptor; 20 import org.apache.servicemix.tck.SpringTestSupport; 21 import org.springframework.context.support.AbstractXmlApplicationContext; 22 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext; 23 24 27 public class MorePojoTest extends SpringTestSupport { 28 29 public void testSendAndReceiveOfMessages() throws Exception { 30 PojoSender sender = (PojoSender) getBean("sender"); 31 sender.sendMessages(messageCount); 32 33 PojoLifecycleAdaptor adaptor = (PojoLifecycleAdaptor) getBean("receiver"); 34 PojoReceiver receiver = (PojoReceiver) adaptor.getPojo(); 35 assertMessagesReceived(receiver.getMessageList(), messageCount); 36 } 37 38 39 protected AbstractXmlApplicationContext createBeanFactory() { 40 return new ClassPathXmlApplicationContext("org/apache/servicemix/components/pojo/example-more-pojo.xml"); 41 } 42 } 43 | Popular Tags |