diff --git a/spring-data-rest-querydsl/pom.xml b/spring-data-rest-querydsl/pom.xml index 55ff78f0cb..2c75990c65 100644 --- a/spring-data-rest-querydsl/pom.xml +++ b/spring-data-rest-querydsl/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 com.baeldung @@ -44,6 +45,11 @@ spring-boot-starter-test test + + com.h2database + h2 + test + diff --git a/spring-data-rest-querydsl/src/main/java/com/baeldung/Application.java b/spring-data-rest-querydsl/src/main/java/com/baeldung/Application.java index 28d084a4dc..4b2f567090 100644 --- a/spring-data-rest-querydsl/src/main/java/com/baeldung/Application.java +++ b/spring-data-rest-querydsl/src/main/java/com/baeldung/Application.java @@ -13,6 +13,9 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import javax.annotation.PostConstruct; +/** + * Note: In the IDE, remember to generate query type classes before running the Integration Test (e.g. in Eclipse right-click on the project > Run As > Maven generate sources) + */ @SpringBootApplication @EntityScan("com.baeldung.entity") @EnableJpaRepositories("com.baeldung.controller.repository") diff --git a/spring-data-rest-querydsl/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-data-rest-querydsl/src/test/java/com/baeldung/SpringContextTest.java similarity index 60% rename from spring-data-rest-querydsl/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to spring-data-rest-querydsl/src/test/java/com/baeldung/SpringContextTest.java index 7f906bdbcd..48c4630fa5 100644 --- a/spring-data-rest-querydsl/src/test/java/org/baeldung/SpringContextIntegrationTest.java +++ b/spring-data-rest-querydsl/src/test/java/com/baeldung/SpringContextTest.java @@ -1,4 +1,4 @@ -package org.baeldung; +package com.baeldung; import org.junit.Test; import org.junit.runner.RunWith; @@ -7,9 +7,13 @@ import org.springframework.test.context.junit4.SpringRunner; import com.baeldung.Application; +/** + * Note: In the IDE, remember to generate query type classes before running the Integration Test (e.g. in Eclipse right-click on the project > Run As > Maven generate sources) + * + */ @RunWith(SpringRunner.class) @SpringBootTest(classes = Application.class) -public class SpringContextIntegrationTest { +public class SpringContextTest { @Test public void whenSpringContextIsBootstrapped_thenNoExceptions() { diff --git a/spring-data-rest-querydsl/src/test/java/org/baeldung/SpringContextLiveTest.java b/spring-data-rest-querydsl/src/test/java/org/baeldung/SpringContextLiveTest.java deleted file mode 100644 index 5cb0a8167e..0000000000 --- a/spring-data-rest-querydsl/src/test/java/org/baeldung/SpringContextLiveTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.baeldung; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.Application; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class) -public class SpringContextLiveTest { - - @Test - public void whenSpringContextIsBootstrapped_thenNoExceptions() { - } -} diff --git a/spring-data-rest-querydsl/src/test/resources/application.yml b/spring-data-rest-querydsl/src/test/resources/application.yml new file mode 100644 index 0000000000..33b7231838 --- /dev/null +++ b/spring-data-rest-querydsl/src/test/resources/application.yml @@ -0,0 +1,11 @@ +spring: + datasource: + url: jdbc:h2:mem:springcloud + username: sa + password: + jpa: + hibernate: + ddl-auto: create-drop + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect \ No newline at end of file diff --git a/spring-ejb/spring-ejb-client/src/test/java/org/baeldung/SpringContextLiveTest.java b/spring-ejb/spring-ejb-client/src/test/java/com/baeldung/SpringContextLiveTest.java similarity index 71% rename from spring-ejb/spring-ejb-client/src/test/java/org/baeldung/SpringContextLiveTest.java rename to spring-ejb/spring-ejb-client/src/test/java/com/baeldung/SpringContextLiveTest.java index bbd3b6c2ba..4d6724f10f 100644 --- a/spring-ejb/spring-ejb-client/src/test/java/org/baeldung/SpringContextLiveTest.java +++ b/spring-ejb/spring-ejb-client/src/test/java/com/baeldung/SpringContextLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung; +package com.baeldung; import org.junit.Test; import org.junit.runner.RunWith; @@ -7,6 +7,11 @@ import org.springframework.test.context.junit4.SpringRunner; import com.baeldung.springejbclient.SpringEjbClientApplication; +/** + * This Live Test requires: + * * run the `spring-ejb-remote` module with the following command: `mvn clean package cargo:run -Pwildfly-standalone` + * + */ @RunWith(SpringRunner.class) @SpringBootTest(classes = SpringEjbClientApplication.class) public class SpringContextLiveTest { diff --git a/spring-ejb/spring-ejb-client/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-ejb/spring-ejb-client/src/test/java/org/baeldung/SpringContextIntegrationTest.java deleted file mode 100644 index 4d2d83646d..0000000000 --- a/spring-ejb/spring-ejb-client/src/test/java/org/baeldung/SpringContextIntegrationTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.baeldung; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.springejbclient.SpringEjbClientApplication; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = SpringEjbClientApplication.class) -public class SpringContextIntegrationTest { - - @Test - public void whenSpringContextIsBootstrapped_thenNoExceptions() { - } -} diff --git a/spring-ejb/spring-ejb-remote/pom.xml b/spring-ejb/spring-ejb-remote/pom.xml index 4f4ddb0b54..4a365180f2 100644 --- a/spring-ejb/spring-ejb-remote/pom.xml +++ b/spring-ejb/spring-ejb-remote/pom.xml @@ -1,11 +1,12 @@ - 4.0.0 spring-ejb-remote - spring-ejb-remote + spring-ejb-remote ejb - + com.baeldung.spring.ejb spring-ejb @@ -46,7 +47,7 @@ wildfly10x - http://download.jboss.org/wildfly/12.0.0.Final/wildfly-12.0.0.Final.zip + https://download.jboss.org/wildfly/12.0.0.Final/wildfly-12.0.0.Final.zip diff --git a/spring-remoting/remoting-jms/remoting-jms-server/src/test/java/com/baeldung/SpringContextLiveTest.java b/spring-remoting/remoting-jms/remoting-jms-server/src/test/java/com/baeldung/SpringContextLiveTest.java new file mode 100644 index 0000000000..4904873be2 --- /dev/null +++ b/spring-remoting/remoting-jms/remoting-jms-server/src/test/java/com/baeldung/SpringContextLiveTest.java @@ -0,0 +1,23 @@ +package com.baeldung; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import com.baeldung.server.JmsServer; + +/** + * This Live Test requires: + * * the `com.baeldung:remoting-http-api:jar:1.0-SNAPSHOT` artifact accessible. For that we can run `mvn clean install` in the 'spring-remoting/remoting-http/remoting-http-api' module. + * * an ActiveMQ instance running (e.g. `docker run -p 61616:61616 -p 8161:8161 --name bael-activemq rmohr/activemq`) + * + */ +@SpringBootTest(classes = JmsServer.class) +@RunWith(SpringRunner.class) +public class SpringContextLiveTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-remoting/remoting-jms/remoting-jms-server/src/test/java/org/baeldung/SpringContextManualTest.java b/spring-remoting/remoting-jms/remoting-jms-server/src/test/java/org/baeldung/SpringContextManualTest.java deleted file mode 100644 index b806f21c27..0000000000 --- a/spring-remoting/remoting-jms/remoting-jms-server/src/test/java/org/baeldung/SpringContextManualTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.baeldung; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.server.JmsServer; - -@SpringBootTest(classes = JmsServer.class) -@RunWith(SpringRunner.class) -public class SpringContextManualTest { - - @Test - public void whenSpringContextIsBootstrapped_thenNoExceptions() { - } -} diff --git a/spring-remoting/remoting-rmi/remoting-rmi-client/src/test/java/org/baeldung/SpringContextLiveTest.java b/spring-remoting/remoting-rmi/remoting-rmi-client/src/test/java/com/baeldung/SpringContextLiveTest.java similarity index 56% rename from spring-remoting/remoting-rmi/remoting-rmi-client/src/test/java/org/baeldung/SpringContextLiveTest.java rename to spring-remoting/remoting-rmi/remoting-rmi-client/src/test/java/com/baeldung/SpringContextLiveTest.java index 3bace4cd1e..73f7592dcc 100644 --- a/spring-remoting/remoting-rmi/remoting-rmi-client/src/test/java/org/baeldung/SpringContextLiveTest.java +++ b/spring-remoting/remoting-rmi/remoting-rmi-client/src/test/java/com/baeldung/SpringContextLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung; +package com.baeldung; import org.junit.Test; import org.junit.runner.RunWith; @@ -7,6 +7,12 @@ import org.springframework.test.context.junit4.SpringRunner; import com.baeldung.client.RmiClient; +/** + * This Live Test requires: + * * the `com.baeldung:remoting-http-api:jar:1.0-SNAPSHOT` artifact accessible. For that we can run `mvn clean install` in the 'spring-remoting/remoting-http/remoting-http-api' module. + * * the 'spring-remoting\remoting-rmi\remoting-rmi-server' service running + * + */ @SpringBootTest(classes = RmiClient.class) @RunWith(SpringRunner.class) public class SpringContextLiveTest { diff --git a/spring-rest-query-language/src/test/java/com/baeldung/SpringContextIntegrationTest.java b/spring-rest-query-language/src/test/java/com/baeldung/SpringContextIntegrationTest.java deleted file mode 100644 index 18fabce5ca..0000000000 --- a/spring-rest-query-language/src/test/java/com/baeldung/SpringContextIntegrationTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.baeldung; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.spring.Application; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class) -public class SpringContextIntegrationTest { - - @Test - public void whenSpringContextIsBootstrapped_thenNoExceptions() { - } -} diff --git a/spring-rest-query-language/src/test/java/com/baeldung/SpringContextTest.java b/spring-rest-query-language/src/test/java/com/baeldung/SpringContextTest.java index 57886a232a..de83fb663a 100644 --- a/spring-rest-query-language/src/test/java/com/baeldung/SpringContextTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/SpringContextTest.java @@ -7,6 +7,10 @@ import org.springframework.test.context.junit4.SpringRunner; import com.baeldung.spring.Application; +/** + * Note: In the IDE, remember to generate query type classes before running the Integration Test (e.g. in Eclipse right-click on the project > Run As > Maven generate sources) + * + */ @RunWith(SpringRunner.class) @SpringBootTest(classes = Application.class) public class SpringContextTest {