Merge previously split strings

Merge some string lines that were previously split because of the
90 chars wide formatting.
This commit is contained in:
Phillip Webb
2019-07-14 19:39:18 +01:00
parent c3816bfe7b
commit 01933f9b06
173 changed files with 351 additions and 370 deletions

View File

@@ -88,8 +88,8 @@ public class SpringBootContextLoader extends AbstractContextLoader {
Class<?>[] configClasses = config.getClasses();
String[] configLocations = config.getLocations();
Assert.state(!ObjectUtils.isEmpty(configClasses) || !ObjectUtils.isEmpty(configLocations),
() -> "No configuration classes " + "or locations found in @SpringApplicationConfiguration. "
+ "For default configuration detection to work you need " + "Spring 4.0.3 or better (found "
() -> "No configuration classes or locations found in @SpringApplicationConfiguration. "
+ "For default configuration detection to work you need Spring 4.0.3 or better (found "
+ SpringVersion.getVersion() + ").");
SpringApplication application = getSpringApplication();
application.setMainApplicationClass(config.getTestClass());
@@ -244,7 +244,7 @@ public class SpringBootContextLoader extends AbstractContextLoader {
@Override
public ApplicationContext loadContext(String... locations) throws Exception {
throw new UnsupportedOperationException(
"SpringApplicationContextLoader " + "does not support the loadContext(String...) method");
"SpringApplicationContextLoader does not support the loadContext(String...) method");
}
@Override

View File

@@ -85,7 +85,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
private static final String REACTIVE_WEB_ENVIRONMENT_CLASS = "org.springframework."
+ "web.reactive.DispatcherHandler";
private static final String MVC_WEB_ENVIRONMENT_CLASS = "org.springframework." + "web.servlet.DispatcherServlet";
private static final String MVC_WEB_ENVIRONMENT_CLASS = "org.springframework.web.servlet.DispatcherServlet";
private static final String JERSEY_WEB_ENVIRONMENT_CLASS = "org.glassfish.jersey.server.ResourceConfig";
@@ -232,7 +232,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
Class<?> found = new AnnotatedClassFinder(SpringBootConfiguration.class)
.findFromClass(mergedConfig.getTestClass());
Assert.state(found != null, "Unable to find a @SpringBootConfiguration, you need to use "
+ "@ContextConfiguration or @SpringBootTest(classes=...) " + "with your test");
+ "@ContextConfiguration or @SpringBootTest(classes=...) with your test");
logger.info("Found @SpringBootConfiguration " + found.getName() + " for test " + mergedConfig.getTestClass());
return merge(found, classes);
}
@@ -327,7 +327,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS).isPresent(WebAppConfiguration.class)) {
throw new IllegalStateException("@WebAppConfiguration should only be used "
+ "with @SpringBootTest when @SpringBootTest is configured with a "
+ "mock web environment. Please remove @WebAppConfiguration or " + "reconfigure @SpringBootTest.");
+ "mock web environment. Please remove @WebAppConfiguration or reconfigure @SpringBootTest.");
}
}

View File

@@ -69,12 +69,12 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
private void logDuplicateJsonObjectsWarning(List<URL> jsonObjects) {
StringBuilder message = new StringBuilder(
String.format("%n%nFound multiple occurrences of" + " org.json.JSONObject on the class path:%n%n"));
String.format("%n%nFound multiple occurrences of org.json.JSONObject on the class path:%n%n"));
for (URL jsonObject : jsonObjects) {
message.append(String.format("\t%s%n", jsonObject));
}
message.append(String
.format("%nYou may wish to exclude one of them to ensure" + " predictable runtime behavior%n"));
message.append(
String.format("%nYou may wish to exclude one of them to ensure predictable runtime behavior%n"));
this.logger.warn(message);
}

View File

@@ -125,7 +125,7 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
Assert.isInstanceOf(BeanDefinitionRegistry.class, beanFactory,
"@MockBean can only be used on bean factories that " + "implement BeanDefinitionRegistry");
"@MockBean can only be used on bean factories that implement BeanDefinitionRegistry");
postProcessBeanFactory(beanFactory, (BeanDefinitionRegistry) beanFactory);
}

View File

@@ -96,9 +96,9 @@ public class MockServerRestTemplateCustomizer implements RestTemplateCustomizer
public MockRestServiceServer getServer() {
Assert.state(!this.servers.isEmpty(), "Unable to return a single MockRestServiceServer since "
+ "MockServerRestTemplateCustomizer has not been bound to " + "a RestTemplate");
+ "MockServerRestTemplateCustomizer has not been bound to a RestTemplate");
Assert.state(this.servers.size() == 1, "Unable to return a single MockRestServiceServer since "
+ "MockServerRestTemplateCustomizer has been bound to " + "more than one RestTemplate");
+ "MockServerRestTemplateCustomizer has been bound to more than one RestTemplate");
return this.servers.values().iterator().next();
}

View File

@@ -178,7 +178,7 @@ class ApplicationContextAssertProviderTests {
void toStringWhenContextFailsToStartShouldReturnSimpleString() {
ApplicationContextAssertProvider<ApplicationContext> context = get(this.startupFailureSupplier);
assertThat(context.toString()).isEqualTo("Unstarted application context "
+ "org.springframework.context.ApplicationContext" + "[startupFailure=java.lang.RuntimeException]");
+ "org.springframework.context.ApplicationContext[startupFailure=java.lang.RuntimeException]");
}
@Test

View File

@@ -42,7 +42,7 @@ class SpringBootTestContextBootstrapperTests {
.isThrownBy(() -> buildTestContext(SpringBootTestNonMockWebEnvironmentAndWebAppConfiguration.class))
.withMessageContaining("@WebAppConfiguration should only be used with "
+ "@SpringBootTest when @SpringBootTest is configured with a mock web "
+ "environment. Please remove @WebAppConfiguration or reconfigure " + "@SpringBootTest.");
+ "environment. Please remove @WebAppConfiguration or reconfigure @SpringBootTest.");
}
@Test

View File

@@ -49,7 +49,7 @@ class MockitoPostProcessorTests {
context.register(MultipleBeans.class);
assertThatIllegalStateException().isThrownBy(context::refresh)
.withMessageContaining("Unable to register mock bean " + ExampleService.class.getName()
+ " expected a single matching bean to replace " + "but found [example1, example2]");
+ " expected a single matching bean to replace but found [example1, example2]");
}
@Test
@@ -59,7 +59,7 @@ class MockitoPostProcessorTests {
context.register(MultipleQualifiedBeans.class);
assertThatIllegalStateException().isThrownBy(context::refresh)
.withMessageContaining("Unable to register mock bean " + ExampleService.class.getName()
+ " expected a single matching bean to replace " + "but found [example1, example3]");
+ " expected a single matching bean to replace but found [example1, example3]");
}
@Test