pull/590/head
Phillip Webb 11 years ago
parent aa3f0556dc
commit beaddb2362

@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,8 +26,6 @@ import org.crsh.plugin.PluginLifeCycle;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.ShellProperties;
import org.springframework.boot.actuate.autoconfigure.ShellProperties.CrshShellProperties;
import org.springframework.boot.actuate.autoconfigure.ShellProperties.JaasAuthenticationProperties;
import org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties;

@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -127,16 +127,16 @@ public class CodahaleMetricWriterTests {
public void run() {
for (int i = 0; i < 10000; i++) {
try {
Metric<Integer> metric1 = new Metric<Integer>(
"timer.test.service", this.index);
Metric<Integer> metric1 = new Metric<Integer>("timer.test.service",
this.index);
this.writer.set(metric1);
Metric<Integer> metric2 = new Metric<Integer>(
"histogram.test.service", this.index);
this.writer.set(metric2);
Metric<Integer> metric3 = new Metric<Integer>(
"gauge.test.service", this.index);
Metric<Integer> metric3 = new Metric<Integer>("gauge.test.service",
this.index);
this.writer.set(metric3);
}
catch (IllegalArgumentException iae) {

@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,8 +33,7 @@ import org.springframework.util.StringUtils;
/**
* {@link EnableAutoConfiguration Auto-configuration} that configures the
* {@link ConfigurableEmbeddedServletContainer} from a {@link ServerProperties}
* bean.
* {@link ConfigurableEmbeddedServletContainer} from a {@link ServerProperties} bean.
*
* @author Dave Syer
*/

@ -36,7 +36,7 @@ import static org.junit.Assert.assertTrue;
/**
* Tests for {@link JmsTemplateAutoConfiguration}.
*
*
* @author Greg Turnquist
*/
public class JmsTemplateAutoConfigurationTests {

@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -25,6 +25,8 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import static org.junit.Assert.assertEquals;
/**
* Tests for {@link MongoAutoConfiguration}.
*
* @author Dave Syer
*/
public class MongoAutoConfigurationTests {

@ -75,8 +75,10 @@ public class JarCommandIT {
assertThat(invocation.getErrorOutput(), equalTo(""));
assertThat(invocation.getStandardOutput(), containsString("Hello World!"));
assertThat(invocation.getStandardOutput(), containsString("/public/public.txt"));
assertThat(invocation.getStandardOutput(), containsString("/resources/resource.txt"));
assertThat(invocation.getStandardOutput(),
containsString("/resources/resource.txt"));
assertThat(invocation.getStandardOutput(), containsString("/static/static.txt"));
assertThat(invocation.getStandardOutput(), containsString("/templates/template.txt"));
assertThat(invocation.getStandardOutput(),
containsString("/templates/template.txt"));
}
}

@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,8 +16,6 @@
package sample.actuator.log4j;
import static org.junit.Assert.assertEquals;
import java.util.Map;
import org.junit.Test;
@ -31,13 +29,15 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import static org.junit.Assert.assertEquals;
/**
* Basic integration tests for service demo application.
*
* @author Dave Syer
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes=SampleActuatorApplication.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class)
@WebAppConfiguration
@IntegrationTest
@DirtiesContext

@ -52,8 +52,8 @@ public class SampleWebSecureApplication extends WebMvcConfigurerAdapter {
public static void main(String[] args) throws Exception {
// Set user password to "password" for demo purposes only
new SpringApplicationBuilder(SampleWebSecureApplication.class).properties("security.user.password=password").run(
args);
new SpringApplicationBuilder(SampleWebSecureApplication.class).properties(
"security.user.password=password").run(args);
}
@Override

@ -68,7 +68,8 @@ public class SpringBootPlugin implements Plugin<Project> {
enhanceRunTask(project);
addRunAppTask(project);
if (project.getTasks().withType(JavaExec.class).isEmpty()) {
// Add the ApplicationPlugin so that a JavaExec task is available (run) to enhance
// Add the ApplicationPlugin so that a JavaExec task is available (run) to
// enhance
project.getPlugins().apply(ApplicationPlugin.class);
}
}
@ -111,7 +112,8 @@ public class SpringBootPlugin implements Plugin<Project> {
if (!project.getTasksByName("compileJava", false).isEmpty()) {
if (!project.getTasksByName("compileGroovy", false).isEmpty()) {
runJarTask.dependsOn("compileJava", "compileGroovy");
} else {
}
else {
runJarTask.dependsOn("compileJava");
}
}

@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -144,7 +144,8 @@ public class RelaxedPropertyResolver implements PropertyResolver {
Assert.isInstanceOf(ConfigurableEnvironment.class, this.resolver,
"SubProperties not available.");
ConfigurableEnvironment env = (ConfigurableEnvironment) this.resolver;
return PropertySourceUtils.getSubProperties(env.getPropertySources(), this.prefix, keyPrefix);
return PropertySourceUtils.getSubProperties(env.getPropertySources(),
this.prefix, keyPrefix);
}
}

@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -62,8 +62,7 @@ public class EmbeddedServletContainerCustomizerBeanPostProcessor implements
return bean;
}
private void postProcessBeforeInitialization(
ConfigurableEmbeddedServletContainer bean) {
private void postProcessBeforeInitialization(ConfigurableEmbeddedServletContainer bean) {
for (EmbeddedServletContainerCustomizer customizer : getCustomizers()) {
customizer.customize(bean);
}

@ -19,7 +19,6 @@ package org.springframework.boot.context.config;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.context.config.DelegatingApplicationContextInitializer;
import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.ApplicationContextException;
import org.springframework.context.ApplicationContextInitializer;

@ -21,7 +21,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.config.DelegatingApplicationListener;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.ApplicationListener;

@ -76,7 +76,7 @@ public class LogbackLoggingSystemTests {
this.loggingSystem.beforeInitialize();
ILoggerFactory factory = StaticLoggerBinder.getSingleton().getLoggerFactory();
LoggerContext context = (LoggerContext) factory;
Logger root = context.getLogger(Logger.ROOT_LOGGER_NAME);
Logger root = context.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
assertNotNull(root.getAppender("CONSOLE"));
}

Loading…
Cancel
Save