Source format and clean-up

This commit is contained in:
Phillip Webb
2013-11-15 23:42:40 -08:00
parent 883fd9162f
commit 64f32893bb
46 changed files with 133 additions and 99 deletions

View File

@@ -27,7 +27,7 @@ import org.springframework.core.NestedCheckedException;
/**
* Tests for {@link SampleMongoApplication}.
*
*
* @author Dave Syer
*/
public class SampleMongoApplicationTests {
@@ -39,13 +39,15 @@ public class SampleMongoApplicationTests {
public void testDefaultSettings() throws Exception {
try {
SampleMongoApplication.main(new String[0]);
} catch (IllegalStateException ex) {
}
catch (IllegalStateException ex) {
if (serverNotRunning(ex)) {
return;
}
}
String output = this.outputCapture.toString();
assertTrue("Wrong output: " + output, output.contains("firstName='Alice', lastName='Smith'"));
assertTrue("Wrong output: " + output,
output.contains("firstName='Alice', lastName='Smith'"));
}
private boolean serverNotRunning(IllegalStateException e) {