User AssertJ's hasSize() for arrays

Achieved via global search-and-replace.
This commit is contained in:
Sam Brannen
2022-11-22 17:03:45 +01:00
parent 36f7597f25
commit d5b0b2b1a1
72 changed files with 277 additions and 277 deletions

View File

@@ -195,7 +195,7 @@ abstract class AbstractAspectJAdvisorFactoryTests {
Advised advised = (Advised) itb;
// Will be ExposeInvocationInterceptor, synthetic instantiation advisor, 2 method advisors
assertThat(advised.getAdvisors().length).isEqualTo(4);
assertThat(advised.getAdvisors()).hasSize(4);
ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor sia =
(ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor) advised.getAdvisors()[1];
assertThat(sia.getPointcut().getMethodMatcher().matches(TestBean.class.getMethod("getSpouse"), null)).isTrue();
@@ -231,7 +231,7 @@ abstract class AbstractAspectJAdvisorFactoryTests {
Advised advised = (Advised) itb;
// Will be ExposeInvocationInterceptor, synthetic instantiation advisor, 2 method advisors
assertThat(advised.getAdvisors().length).isEqualTo(4);
assertThat(advised.getAdvisors()).hasSize(4);
ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor sia =
(ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor) advised.getAdvisors()[1];
assertThat(sia.getPointcut().getMethodMatcher().matches(TestBean.class.getMethod("getSpouse"), null)).isTrue();

View File

@@ -56,7 +56,7 @@ public abstract class AbstractRegexpMethodPointcutTests {
protected void noPatternSuppliedTests(AbstractRegexpMethodPointcut rpc) throws Exception {
assertThat(rpc.matches(Object.class.getMethod("hashCode"), String.class)).isFalse();
assertThat(rpc.matches(Object.class.getMethod("wait"), Object.class)).isFalse();
assertThat(rpc.getPatterns().length).isEqualTo(0);
assertThat(rpc.getPatterns()).hasSize(0);
}
@Test