Use AssertJ's hasSize() for collections and maps
Achieved via a global search-and-replace.
This commit is contained in:
@@ -107,7 +107,7 @@ public class AnnotationTransactionNamespaceHandlerTests {
|
||||
public void transactionalEventListenerRegisteredProperly() {
|
||||
assertThat(this.context.containsBean(TransactionManagementConfigUtils
|
||||
.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME)).isTrue();
|
||||
assertThat(this.context.getBeansOfType(TransactionalEventListenerFactory.class).size()).isEqualTo(1);
|
||||
assertThat(this.context.getBeansOfType(TransactionalEventListenerFactory.class)).hasSize(1);
|
||||
}
|
||||
|
||||
private TransactionalTestBean getTestBean() {
|
||||
|
||||
@@ -216,7 +216,7 @@ public class EnableTransactionManagementTests {
|
||||
public void transactionalEventListenerRegisteredProperly() {
|
||||
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(EnableTxConfig.class);
|
||||
assertThat(ctx.containsBean(TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME)).isTrue();
|
||||
assertThat(ctx.getBeansOfType(TransactionalEventListenerFactory.class).size()).isEqualTo(1);
|
||||
assertThat(ctx.getBeansOfType(TransactionalEventListenerFactory.class)).hasSize(1);
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user