From 375c50e805f35c1cb851be89682112420e142841 Mon Sep 17 00:00:00 2001 From: sachin29aug Date: Sat, 15 Sep 2018 13:57:53 -0400 Subject: [PATCH] BAEL-8939: Adding a Spring Context test in all Spring Modules (changes for around 21 more modules.. work in progress..) --- spring-rest-embedded-tomcat/pom.xml | 7 ++++++ .../SpringContextIntegrationTest.java | 18 ++++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 17 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 19 +++++++++++++++ .../SpringContextIntegrationTest.java | 20 ++++++++++++++++ .../SpringContextIntegrationTest.java | 15 ++++++++++++ .../SpringContextIntegrationTest.java | 22 +++++++++++++++++ .../pom.xml | 8 +++++++ .../SpringContextIntegrationTest.java | 20 ++++++++++++++++ spring-security-mvc-session/pom.xml | 8 +++++++ .../SpringContextIntegrationTest.java | 19 +++++++++++++++ spring-security-mvc-socket/pom.xml | 8 +++++++ .../SpringContextIntegrationTest.java | 24 +++++++++++++++++++ .../SpringContextIntegrationTest.java | 16 +++++++++++++ .../SpringContextIntegrationTest.java | 21 ++++++++++++++++ 25 files changed, 402 insertions(+) create mode 100644 spring-rest-embedded-tomcat/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-rest-full/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-rest-query-language/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-rest-simple/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-resttemplate/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-acl/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-cache-control/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-core/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-mvc-login/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-mvc-session/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-openid/src/test/java/org/baeldung/SpringContextIntegrationTest.java create mode 100644 spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java diff --git a/spring-rest-embedded-tomcat/pom.xml b/spring-rest-embedded-tomcat/pom.xml index 9f6eb0d703..8ccd9645d3 100644 --- a/spring-rest-embedded-tomcat/pom.xml +++ b/spring-rest-embedded-tomcat/pom.xml @@ -58,6 +58,13 @@ httpcore ${httpcore.version} + + + org.springframework.boot + spring-boot-starter-test + 1.5.10.RELEASE + test + diff --git a/spring-rest-embedded-tomcat/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-rest-embedded-tomcat/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..8b8ff1a322 --- /dev/null +++ b/spring-rest-embedded-tomcat/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,18 @@ +package org.baeldung; + +import org.baeldung.embedded.configuration.UserConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { UserConfiguration.class }) +@WebAppConfiguration +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-rest-full/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-rest-full/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..35939c992f --- /dev/null +++ b/spring-rest-full/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.spring.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@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/org/baeldung/SpringContextIntegrationTest.java b/spring-rest-query-language/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..35939c992f --- /dev/null +++ b/spring-rest-query-language/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.spring.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-rest-simple/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-rest-simple/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..66243ef00d --- /dev/null +++ b/spring-rest-simple/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.config.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-resttemplate/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-resttemplate/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..3a5a20cfeb --- /dev/null +++ b/spring-resttemplate/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.resttemplate.configuration.RestTemplateConfigurationApplication; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = RestTemplateConfigurationApplication.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-acl/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-acl/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..c7890d79ac --- /dev/null +++ b/spring-security-acl/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.acl.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-cache-control/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-cache-control/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..c047fc6210 --- /dev/null +++ b/spring-security-cache-control/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,17 @@ +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.cachecontrol.AppRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = AppRunner.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..66243ef00d --- /dev/null +++ b/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.config.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..66243ef00d --- /dev/null +++ b/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.config.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..66243ef00d --- /dev/null +++ b/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.config.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..66243ef00d --- /dev/null +++ b/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.config.Application; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-core/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-core/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..5698afa417 --- /dev/null +++ b/spring-security-core/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.app.App; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = App.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..9e74e83a53 --- /dev/null +++ b/spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,19 @@ +package org.baeldung; + +import org.baeldung.spring.MvcConfig; +import org.baeldung.spring.SecSecurityConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { MvcConfig.class, SecSecurityConfig.class }) +@WebAppConfiguration +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..a4a85a8fa2 --- /dev/null +++ b/spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,20 @@ +package org.baeldung; + +import org.baeldung.spring.ClientConfig; +import org.baeldung.spring.MvcConfig; +import org.baeldung.spring.SecSecurityConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { ClientConfig.class, MvcConfig.class, SecSecurityConfig.class }) +@WebAppConfiguration +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..0b701e9acf --- /dev/null +++ b/spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,15 @@ +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; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = SampleLDAPApplication.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-mvc-login/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-login/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..46bbc629c7 --- /dev/null +++ b/spring-security-mvc-login/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,22 @@ +package org.baeldung; + +import org.baeldung.spring.ChannelSecSecurityConfig; +import org.baeldung.spring.MvcConfig; +import org.baeldung.spring.RedirectionSecurityConfig; +import org.baeldung.spring.SecSecurityConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { MvcConfig.class, ChannelSecSecurityConfig.class, RedirectionSecurityConfig.class, + SecSecurityConfig.class }) +@WebAppConfiguration +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-mvc-persisted-remember-me/pom.xml b/spring-security-mvc-persisted-remember-me/pom.xml index 2add895ecb..8b15e658e8 100644 --- a/spring-security-mvc-persisted-remember-me/pom.xml +++ b/spring-security-mvc-persisted-remember-me/pom.xml @@ -133,6 +133,14 @@ guava ${guava.version} + + + + org.springframework.boot + spring-boot-starter-test + 1.5.10.RELEASE + test + diff --git a/spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..f1df880862 --- /dev/null +++ b/spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,20 @@ +package org.baeldung; + +import org.baeldung.spring.MvcConfig; +import org.baeldung.spring.PersistenceConfig; +import org.baeldung.spring.SecurityConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { MvcConfig.class, PersistenceConfig.class, SecurityConfig.class }) +@WebAppConfiguration +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-mvc-session/pom.xml b/spring-security-mvc-session/pom.xml index 7ffbd76aac..85c8475657 100644 --- a/spring-security-mvc-session/pom.xml +++ b/spring-security-mvc-session/pom.xml @@ -113,6 +113,14 @@ metrics-core ${codahale.metrics.version} + + + + org.springframework.boot + spring-boot-starter-test + 1.5.10.RELEASE + test + diff --git a/spring-security-mvc-session/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-session/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..9e74e83a53 --- /dev/null +++ b/spring-security-mvc-session/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,19 @@ +package org.baeldung; + +import org.baeldung.spring.MvcConfig; +import org.baeldung.spring.SecSecurityConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { MvcConfig.class, SecSecurityConfig.class }) +@WebAppConfiguration +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-mvc-socket/pom.xml b/spring-security-mvc-socket/pom.xml index b7559753b5..365a803705 100644 --- a/spring-security-mvc-socket/pom.xml +++ b/spring-security-mvc-socket/pom.xml @@ -148,6 +148,14 @@ jackson-annotations ${jackson.version} + + + + org.springframework.boot + spring-boot-starter-test + 1.5.10.RELEASE + test + diff --git a/spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..00202a98cb --- /dev/null +++ b/spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,24 @@ +package org.baeldung; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; + +import com.baeldung.springsecuredsockets.config.AppConfig; +import com.baeldung.springsecuredsockets.config.DataStoreConfig; +import com.baeldung.springsecuredsockets.config.SecurityConfig; +import com.baeldung.springsecuredsockets.config.SocketBrokerConfig; +import com.baeldung.springsecuredsockets.config.SocketSecurityConfig; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { AppConfig.class, DataStoreConfig.class, SecurityConfig.class, + SocketBrokerConfig.class, SocketSecurityConfig.class }) +@WebAppConfiguration +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-openid/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-openid/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..79a725dcae --- /dev/null +++ b/spring-security-openid/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.baeldung.config.SpringOpenidApplication; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = SpringOpenidApplication.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java new file mode 100644 index 0000000000..e56f5d5031 --- /dev/null +++ b/spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextIntegrationTest.java @@ -0,0 +1,21 @@ +package org.baeldung; + +import org.baeldung.client.spring.ClientConfig; +import org.baeldung.spring.SecSecurityConfig; +import org.baeldung.spring.WebConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; +import org.springframework.test.context.web.WebAppConfiguration; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { ClientConfig.class, SecSecurityConfig.class, + WebConfig.class }, loader = AnnotationConfigContextLoader.class) +public class SpringContextIntegrationTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +}