polishing

This commit is contained in:
Mark Fisher
2008-05-15 13:21:59 +00:00
parent 19b33f5af9
commit 37b2f0a87d
2 changed files with 4 additions and 6 deletions

View File

@@ -24,6 +24,7 @@ import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
import org.springframework.core.io.support.PropertiesLoaderUtils;

View File

@@ -145,16 +145,13 @@ public class MessageBusParserTests {
TestMessageBusAwareImpl messageBusAware = (TestMessageBusAwareImpl) context.getBean("messageBusAwareBean");
assertTrue(messageBusAware.getMessageBus() == context.getBean(MessageBusParser.MESSAGE_BUS_BEAN_NAME));
}
@Test
public void testMessageBusWithChannelFactory() {
ApplicationContext context = new ClassPathXmlApplicationContext("messageBusWithChannelFactory.xml",
this.getClass());
MessageBus bus = (MessageBus) context.getBean(MessageBusParser.MESSAGE_BUS_BEAN_NAME);
assertTrue (context.getBean("defaultTypeChannel") instanceof SynchronousChannel);
assertTrue (context.getBean("specifiedTypeChannel") instanceof QueueChannel);
assertEquals(SynchronousChannel.class, context.getBean("defaultTypeChannel").getClass());
assertEquals(QueueChannel.class, context.getBean("specifiedTypeChannel").getClass());
}
}