コード例 #1
0
 @Test
 public void testPubSubDomainOverride() {
   load(TestConfiguration.class, "spring.jms.pubSubDomain:false");
   JmsTemplate jmsTemplate = this.context.getBean(JmsTemplate.class);
   ActiveMQConnectionFactory connectionFactory =
       this.context.getBean(ActiveMQConnectionFactory.class);
   assertThat(jmsTemplate).isNotNull();
   assertThat(jmsTemplate.isPubSubDomain()).isFalse();
   assertThat(connectionFactory).isNotNull();
   assertThat(connectionFactory).isEqualTo(jmsTemplate.getConnectionFactory());
 }
コード例 #2
0
 @Test
 public void testPubSubDomainActive() {
   load(TestConfiguration.class, "spring.jms.pubSubDomain:true");
   JmsTemplate jmsTemplate = this.context.getBean(JmsTemplate.class);
   DefaultMessageListenerContainer defaultMessageListenerContainer =
       this.context
           .getBean(DefaultJmsListenerContainerFactory.class)
           .createListenerContainer(mock(JmsListenerEndpoint.class));
   assertThat(jmsTemplate.isPubSubDomain()).isTrue();
   assertThat(defaultMessageListenerContainer.isPubSubDomain()).isTrue();
 }
コード例 #3
0
 @Test
 public void testJmsTemplatePostProcessedSoThatPubSubIsTrue() {
   load(TestConfiguration4.class);
   JmsTemplate jmsTemplate = this.context.getBean(JmsTemplate.class);
   assertThat(jmsTemplate.isPubSubDomain()).isTrue();
 }
コード例 #4
0
 @Test
 public void testPubSubDisabledByDefault() {
   load(TestConfiguration.class);
   JmsTemplate jmsTemplate = this.context.getBean(JmsTemplate.class);
   assertThat(jmsTemplate.isPubSubDomain()).isFalse();
 }