From 2717fb7d8e0e4a90f61b091ede6c684580d96516 Mon Sep 17 00:00:00 2001 From: Arm Suwarnaratana Date: Fri, 16 Sep 2016 16:26:55 -0500 Subject: [PATCH] fixed 'tests' --- src/main/java/com/armzilla/ha/SpringbootEntry.java | 2 +- src/test/java/demo/DemoApplicationTests.java | 2 ++ src/test/resources/test.properties | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/test.properties diff --git a/src/main/java/com/armzilla/ha/SpringbootEntry.java b/src/main/java/com/armzilla/ha/SpringbootEntry.java index 08907b9..93009c1 100644 --- a/src/main/java/com/armzilla/ha/SpringbootEntry.java +++ b/src/main/java/com/armzilla/ha/SpringbootEntry.java @@ -21,5 +21,5 @@ public class SpringbootEntry { public static void main(String[] args) { SpringApplication.run(SpringbootEntry.class, args); } - + } diff --git a/src/test/java/demo/DemoApplicationTests.java b/src/test/java/demo/DemoApplicationTests.java index 8ca1356..2f51058 100644 --- a/src/test/java/demo/DemoApplicationTests.java +++ b/src/test/java/demo/DemoApplicationTests.java @@ -3,12 +3,14 @@ import com.armzilla.ha.SpringbootEntry; import org.junit.Test; import org.junit.runner.RunWith; +import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = SpringbootEntry.class) +@TestPropertySource(locations="classpath:test.properties") @WebAppConfiguration public class DemoApplicationTests { diff --git a/src/test/resources/test.properties b/src/test/resources/test.properties new file mode 100644 index 0000000..841379d --- /dev/null +++ b/src/test/resources/test.properties @@ -0,0 +1,5 @@ +upnp.response.port=50000 +upnp.config.address=192.168.1.1 +emulator.portbase=8080 +emulator.portcount=3 +upnp.disable=false