Polish lambda formatting

This commit is contained in:
Phillip Webb
2017-07-24 13:18:33 -07:00
parent 7b2b8dc4a3
commit 3a01f4a6da
28 changed files with 71 additions and 73 deletions

View File

@@ -51,7 +51,7 @@ public abstract class AbstractApplicationContextTesterTests<T extends AbstractAp
public void runWithSystemPropertiesShouldSetAndRemoveProperties() {
String key = "test." + UUID.randomUUID().toString();
assertThat(System.getProperties().containsKey(key)).isFalse();
get().withSystemProperties(key + "=value").run(loaded -> {
get().withSystemProperties(key + "=value").run((loaded) -> {
assertThat(System.getProperties()).containsEntry(key, "value");
});
assertThat(System.getProperties().containsKey(key)).isFalse();
@@ -63,7 +63,7 @@ public abstract class AbstractApplicationContextTesterTests<T extends AbstractAp
String key = "test." + UUID.randomUUID().toString();
assertThat(System.getProperties().containsKey(key)).isFalse();
get().withSystemProperties(key + "=value")
.withUserConfiguration(FailingConfig.class).run(loaded -> {
.withUserConfiguration(FailingConfig.class).run((loaded) -> {
assertThat(loaded).hasFailed();
});
assertThat(System.getProperties().containsKey(key)).isFalse();
@@ -76,7 +76,7 @@ public abstract class AbstractApplicationContextTesterTests<T extends AbstractAp
System.setProperty(key, "value");
try {
assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
get().withSystemProperties(key + "=newValue").run(loaded -> {
get().withSystemProperties(key + "=newValue").run((loaded) -> {
assertThat(System.getProperties()).containsEntry(key, "newValue");
});
assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
@@ -93,7 +93,7 @@ public abstract class AbstractApplicationContextTesterTests<T extends AbstractAp
System.setProperty(key, "value");
try {
assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
get().withSystemProperty(key, null).run(loaded -> {
get().withSystemProperty(key, null).run((loaded) -> {
assertThat(System.getProperties()).doesNotContainKey(key);
});
assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
@@ -106,7 +106,7 @@ public abstract class AbstractApplicationContextTesterTests<T extends AbstractAp
@Test
public void runWithMultiplePropertyValuesShouldAllAllValues() throws Exception {
get().withPropertyValues("test.foo=1").withPropertyValues("test.bar=2")
.run(loaded -> {
.run((loaded) -> {
Environment environment = loaded.getEnvironment();
assertThat(environment.getProperty("test.foo")).isEqualTo("1");
assertThat(environment.getProperty("test.bar")).isEqualTo("2");
@@ -117,7 +117,7 @@ public abstract class AbstractApplicationContextTesterTests<T extends AbstractAp
public void runWithPropertyValuesWhenHasExistingShouldReplaceValue()
throws Exception {
get().withPropertyValues("test.foo=1").withPropertyValues("test.foo=2")
.run(loaded -> {
.run((loaded) -> {
Environment environment = loaded.getEnvironment();
assertThat(environment.getProperty("test.foo")).isEqualTo("2");
});