Add Spring Mobile Device Resolver autoconfiguration

This commit is contained in:
Roy Clarkson
2013-09-26 10:26:45 -04:00
committed by Dave Syer
parent f306eda703
commit 5cdaa43912
9 changed files with 299 additions and 3 deletions

View File

@@ -16,6 +16,9 @@
package org.springframework.boot.cli;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.net.URL;
import java.util.concurrent.Callable;
@@ -34,14 +37,12 @@ import org.springframework.boot.OutputCapture;
import org.springframework.boot.cli.command.CleanCommand;
import org.springframework.boot.cli.command.RunCommand;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* Integration tests to exercise the samples.
*
* @author Dave Syer
* @author Greg Turnquist
* @author Roy Clarkson
*/
public class SampleIntegrationTests {
@@ -214,4 +215,12 @@ public class SampleIntegrationTests {
output.contains("Received Greetings from Spring Boot via RabbitMQ"));
}
@Test
public void deviceSample() throws Exception {
start("samples/device.groovy");
String result = FileUtil.readEntirely(new URL("http://localhost:8080")
.openStream());
assertEquals("Hello Normal Device!", result);
}
}