@@ -56,7 +56,7 @@ void setup(@TempDir Path projectDir) {
5656 @ Test
5757 void whenPackagesAreTangledTaskFailsAndWritesAReport () throws IOException {
5858 runGradleWithCompiledClasses ("tangled" ,
59- shouldHaveFailureReportWithMessage ("slices matching '(**)' should be free of cycles" ));
59+ shouldHaveFailureReportWithMessages ("slices matching '(**)' should be free of cycles" ));
6060 }
6161
6262 @ Test
@@ -67,15 +67,15 @@ void whenPackagesAreNotTangledTaskSucceedsAndWritesAnEmptyReport() throws IOExce
6767 @ Test
6868 void whenBeanPostProcessorBeanMethodIsNotStaticTaskFailsAndWritesAReport () throws IOException {
6969 runGradleWithCompiledClasses ("bpp/nonstatic" ,
70- shouldHaveFailureReportWithMessage (
70+ shouldHaveFailureReportWithMessages (
7171 "methods that are annotated with @Bean and have raw return type assignable "
7272 + "to org.springframework.beans.factory.config.BeanPostProcessor" ));
7373 }
7474
7575 @ Test
7676 void whenBeanPostProcessorBeanMethodIsStaticAndHasUnsafeParametersTaskFailsAndWritesAReport () throws IOException {
7777 runGradleWithCompiledClasses ("bpp/unsafeparameters" ,
78- shouldHaveFailureReportWithMessage (
78+ shouldHaveFailureReportWithMessages (
7979 "methods that are annotated with @Bean and have raw return type assignable "
8080 + "to org.springframework.beans.factory.config.BeanPostProcessor" ));
8181 }
@@ -95,14 +95,14 @@ void whenBeanPostProcessorBeanMethodIsStaticAndHasNoParametersTaskSucceedsAndWri
9595 @ Test
9696 void whenBeanFactoryPostProcessorBeanMethodIsNotStaticTaskFailsAndWritesAReport () throws IOException {
9797 runGradleWithCompiledClasses ("bfpp/nonstatic" ,
98- shouldHaveFailureReportWithMessage ("methods that are annotated with @Bean and have raw return "
98+ shouldHaveFailureReportWithMessages ("methods that are annotated with @Bean and have raw return "
9999 + "type assignable to org.springframework.beans.factory.config.BeanFactoryPostProcessor" ));
100100 }
101101
102102 @ Test
103103 void whenBeanFactoryPostProcessorBeanMethodIsStaticAndHasParametersTaskFailsAndWritesAReport () throws IOException {
104104 runGradleWithCompiledClasses ("bfpp/parameters" ,
105- shouldHaveFailureReportWithMessage ("methods that are annotated with @Bean and have raw return "
105+ shouldHaveFailureReportWithMessages ("methods that are annotated with @Bean and have raw return "
106106 + "type assignable to org.springframework.beans.factory.config.BeanFactoryPostProcessor" ));
107107 }
108108
@@ -114,7 +114,7 @@ void whenBeanFactoryPostProcessorBeanMethodIsStaticAndHasNoParametersTaskSucceed
114114
115115 @ Test
116116 void whenClassLoadsResourceUsingResourceUtilsTaskFailsAndWritesReport () throws IOException {
117- runGradleWithCompiledClasses ("resources/loads" , shouldHaveFailureReportWithMessage (
117+ runGradleWithCompiledClasses ("resources/loads" , shouldHaveFailureReportWithMessages (
118118 "no classes should call method where target owner type org.springframework.util.ResourceUtils and target name 'getURL'" ));
119119 }
120120
@@ -130,26 +130,26 @@ void whenClassDoesNotCallObjectsRequireNonNullTaskSucceedsAndWritesAnEmptyReport
130130
131131 @ Test
132132 void whenClassCallsObjectsRequireNonNullWithMessageTaskFailsAndWritesReport () throws IOException {
133- runGradleWithCompiledClasses ("objects/requireNonNullWithString" , shouldHaveFailureReportWithMessage (
133+ runGradleWithCompiledClasses ("objects/requireNonNullWithString" , shouldHaveFailureReportWithMessages (
134134 "no classes should call method Objects.requireNonNull(Object, String)" ));
135135 }
136136
137137 @ Test
138138 void whenClassCallsObjectsRequireNonNullWithSupplierTaskFailsAndWritesReport () throws IOException {
139- runGradleWithCompiledClasses ("objects/requireNonNullWithSupplier" , shouldHaveFailureReportWithMessage (
139+ runGradleWithCompiledClasses ("objects/requireNonNullWithSupplier" , shouldHaveFailureReportWithMessages (
140140 "no classes should call method Objects.requireNonNull(Object, Supplier)" ));
141141 }
142142
143143 @ Test
144144 void whenClassCallsStringToUpperCaseWithoutLocaleFailsAndWritesReport () throws IOException {
145145 runGradleWithCompiledClasses ("string/toUpperCase" ,
146- shouldHaveFailureReportWithMessage ("because String.toUpperCase(Locale.ROOT) should be used instead" ));
146+ shouldHaveFailureReportWithMessages ("because String.toUpperCase(Locale.ROOT) should be used instead" ));
147147 }
148148
149149 @ Test
150150 void whenClassCallsStringToLowerCaseWithoutLocaleFailsAndWritesReport () throws IOException {
151151 runGradleWithCompiledClasses ("string/toLowerCase" ,
152- shouldHaveFailureReportWithMessage ("because String.toLowerCase(Locale.ROOT) should be used instead" ));
152+ shouldHaveFailureReportWithMessages ("because String.toLowerCase(Locale.ROOT) should be used instead" ));
153153 }
154154
155155 @ Test
@@ -164,7 +164,7 @@ void whenClassCallsStringToUpperCaseWithLocaleShouldNotFail() throws IOException
164164
165165 @ Test
166166 void whenBeanMethodExposePrivateTypeShouldFailAndWriteReport () throws IOException {
167- runGradleWithCompiledClasses ("beans/privatebean" , shouldHaveFailureReportWithMessage (
167+ runGradleWithCompiledClasses ("beans/privatebean" , shouldHaveFailureReportWithMessages (
168168 "methods that are annotated with @Bean should not return types declared with the PRIVATE modifier,"
169169 + " as such types are incompatible with Spring AOT processing" ,
170170 "Method <org.springframework.boot.build.architecture.beans.privatebean.PrivateBean.myBean()> "
@@ -173,7 +173,7 @@ void whenBeanMethodExposePrivateTypeShouldFailAndWriteReport() throws IOExceptio
173173 }
174174
175175 @ Test
176- void whenBeanMethodExposeNonPrivateTypeeShouldNotFail () throws IOException {
176+ void whenBeanMethodExposeNonPrivateTypeShouldNotFail () throws IOException {
177177 runGradleWithCompiledClasses ("beans/regular" , shouldHaveEmptyFailureReport ());
178178 }
179179
@@ -207,7 +207,7 @@ IntegrationMBeanExporter integrationMBeanExporter() {
207207 }
208208 }
209209 """ );
210- runGradle (shouldHaveFailureReportWithMessage ("methods that are annotated with @Bean and have raw return "
210+ runGradle (shouldHaveFailureReportWithMessages ("methods that are annotated with @Bean and have raw return "
211211 + "type assignable to org.springframework.beans.factory.config.BeanPostProcessor " ));
212212 }
213213
@@ -224,7 +224,7 @@ private Consumer<GradleRunner> shouldHaveEmptyFailureReport() {
224224 };
225225 }
226226
227- private Consumer <GradleRunner > shouldHaveFailureReportWithMessage (String ... messages ) {
227+ private Consumer <GradleRunner > shouldHaveFailureReportWithMessages (String ... messages ) {
228228 return (gradleRunner ) -> {
229229 assertThat (gradleRunner .buildAndFail ().getOutput ()).contains ("BUILD FAILED" )
230230 .contains ("Task :checkArchitectureMain FAILED" );
0 commit comments