mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Formatting
This commit is contained in:
parent
3ef667f0d8
commit
04dfac1c6c
@ -54,6 +54,7 @@ import static org.mockito.Mockito.mock;
|
|||||||
* Tests for {@link JmsAutoConfiguration}.
|
* Tests for {@link JmsAutoConfiguration}.
|
||||||
*
|
*
|
||||||
* @author Greg Turnquist
|
* @author Greg Turnquist
|
||||||
|
* @author Stephane Nicoll
|
||||||
*/
|
*/
|
||||||
public class JmsAutoConfigurationTests {
|
public class JmsAutoConfigurationTests {
|
||||||
|
|
||||||
@ -150,11 +151,13 @@ public class JmsAutoConfigurationTests {
|
|||||||
.getBean("jmsListenerContainerFactory", JmsListenerContainerFactory.class);
|
.getBean("jmsListenerContainerFactory", JmsListenerContainerFactory.class);
|
||||||
assertEquals(DefaultJmsListenerContainerFactory.class,
|
assertEquals(DefaultJmsListenerContainerFactory.class,
|
||||||
jmsListenerContainerFactory.getClass());
|
jmsListenerContainerFactory.getClass());
|
||||||
DefaultMessageListenerContainer listenerContainer = ((DefaultJmsListenerContainerFactory)
|
DefaultMessageListenerContainer listenerContainer = ((DefaultJmsListenerContainerFactory) jmsListenerContainerFactory)
|
||||||
jmsListenerContainerFactory).createListenerContainer(mock(JmsListenerEndpoint.class));
|
.createListenerContainer(mock(JmsListenerEndpoint.class));
|
||||||
assertFalse("wrong session transacted flag with JTA transactions", listenerContainer.isSessionTransacted());
|
assertFalse("wrong session transacted flag with JTA transactions",
|
||||||
|
listenerContainer.isSessionTransacted());
|
||||||
assertSame(this.context.getBean(JtaTransactionManager.class),
|
assertSame(this.context.getBean(JtaTransactionManager.class),
|
||||||
new DirectFieldAccessor(listenerContainer).getPropertyValue("transactionManager"));
|
new DirectFieldAccessor(listenerContainer)
|
||||||
|
.getPropertyValue("transactionManager"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -165,10 +168,12 @@ public class JmsAutoConfigurationTests {
|
|||||||
.getBean("jmsListenerContainerFactory", JmsListenerContainerFactory.class);
|
.getBean("jmsListenerContainerFactory", JmsListenerContainerFactory.class);
|
||||||
assertEquals(DefaultJmsListenerContainerFactory.class,
|
assertEquals(DefaultJmsListenerContainerFactory.class,
|
||||||
jmsListenerContainerFactory.getClass());
|
jmsListenerContainerFactory.getClass());
|
||||||
DefaultMessageListenerContainer listenerContainer = ((DefaultJmsListenerContainerFactory)
|
DefaultMessageListenerContainer listenerContainer = ((DefaultJmsListenerContainerFactory) jmsListenerContainerFactory)
|
||||||
jmsListenerContainerFactory).createListenerContainer(mock(JmsListenerEndpoint.class));
|
.createListenerContainer(mock(JmsListenerEndpoint.class));
|
||||||
assertTrue("wrong session transacted flag with no tx manager", listenerContainer.isSessionTransacted());
|
assertTrue("wrong session transacted flag with no tx manager",
|
||||||
assertNull(new DirectFieldAccessor(listenerContainer).getPropertyValue("transactionManager"));
|
listenerContainer.isSessionTransacted());
|
||||||
|
assertNull(new DirectFieldAccessor(listenerContainer)
|
||||||
|
.getPropertyValue("transactionManager"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -178,10 +183,12 @@ public class JmsAutoConfigurationTests {
|
|||||||
.getBean("jmsListenerContainerFactory", JmsListenerContainerFactory.class);
|
.getBean("jmsListenerContainerFactory", JmsListenerContainerFactory.class);
|
||||||
assertEquals(DefaultJmsListenerContainerFactory.class,
|
assertEquals(DefaultJmsListenerContainerFactory.class,
|
||||||
jmsListenerContainerFactory.getClass());
|
jmsListenerContainerFactory.getClass());
|
||||||
DefaultMessageListenerContainer listenerContainer = ((DefaultJmsListenerContainerFactory)
|
DefaultMessageListenerContainer listenerContainer = ((DefaultJmsListenerContainerFactory) jmsListenerContainerFactory)
|
||||||
jmsListenerContainerFactory).createListenerContainer(mock(JmsListenerEndpoint.class));
|
.createListenerContainer(mock(JmsListenerEndpoint.class));
|
||||||
assertTrue("wrong session transacted flag with no tx manager", listenerContainer.isSessionTransacted());
|
assertTrue("wrong session transacted flag with no tx manager",
|
||||||
assertNull(new DirectFieldAccessor(listenerContainer).getPropertyValue("transactionManager"));
|
listenerContainer.isSessionTransacted());
|
||||||
|
assertNull(new DirectFieldAccessor(listenerContainer)
|
||||||
|
.getPropertyValue("transactionManager"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user