diff --git a/spring-cloud/spring-cloud-ribbon-client/pom.xml b/spring-cloud/spring-cloud-ribbon-client/pom.xml index d4862fc4e8..b85db03383 100644 --- a/spring-cloud/spring-cloud-ribbon-client/pom.xml +++ b/spring-cloud/spring-cloud-ribbon-client/pom.xml @@ -1,80 +1,80 @@ - 4.0.0 - com.baeldung - spring-cloud-ribbon - 0.0.1-SNAPSHOT - jar - spring-cloud-ribbon-client - Introduction to Spring Cloud Rest Client with Netflix Ribbon + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + com.baeldung + spring-cloud-ribbon + 0.0.1-SNAPSHOT + jar + spring-cloud-ribbon-client + Introduction to Spring Cloud Rest Client with Netflix Ribbon - - org.springframework.boot - spring-boot-starter-parent - 1.4.2.RELEASE - - + + org.springframework.boot + spring-boot-starter-parent + 1.4.2.RELEASE + + - - UTF-8 - 1.8 - Brixton.SR7 - + + UTF-8 + 1.8 + Brixton.SR7 + - - - org.springframework.cloud - spring-cloud-starter-ribbon - - - org.springframework.boot - spring-boot-starter-web - + + + org.springframework.cloud + spring-cloud-starter-ribbon + + + org.springframework.boot + spring-boot-starter-web + - - org.springframework.boot - spring-boot-starter-test - test - - + + org.springframework.boot + spring-boot-starter-test + test + + - - - - org.springframework.cloud - spring-cloud-dependencies - ${spring-cloud-dependencies.version} - pom - import - - - + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud-dependencies.version} + pom + import + + + - - - - org.springframework.boot - spring-boot-maven-plugin - - - + + + + org.springframework.boot + spring-boot-maven-plugin + + + - - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - true - - - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - - + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + \ No newline at end of file diff --git a/spring-cloud/spring-cloud-ribbon-client/src/test/java/com/baeldung/spring/cloud/ribbon/client/ServerLocationAppTests.java b/spring-cloud/spring-cloud-ribbon-client/src/test/java/com/baeldung/spring/cloud/ribbon/client/ServerLocationAppIntegrationTest.java similarity index 94% rename from spring-cloud/spring-cloud-ribbon-client/src/test/java/com/baeldung/spring/cloud/ribbon/client/ServerLocationAppTests.java rename to spring-cloud/spring-cloud-ribbon-client/src/test/java/com/baeldung/spring/cloud/ribbon/client/ServerLocationAppIntegrationTest.java index b3606537a2..b971565c44 100644 --- a/spring-cloud/spring-cloud-ribbon-client/src/test/java/com/baeldung/spring/cloud/ribbon/client/ServerLocationAppTests.java +++ b/spring-cloud/spring-cloud-ribbon-client/src/test/java/com/baeldung/spring/cloud/ribbon/client/ServerLocationAppIntegrationTest.java @@ -20,7 +20,7 @@ import org.springframework.test.context.junit4.SpringRunner; @SuppressWarnings("unused") @RunWith(SpringRunner.class) @SpringBootTest(classes = ServerLocationApp.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class ServerLocationAppTests { +public class ServerLocationAppIntegrationTest { ConfigurableApplicationContext application2; ConfigurableApplicationContext application3; diff --git a/spring-security-custom-permission/src/test/java/org/baeldung/web/CustomUserDetailsServiceTest.java b/spring-security-custom-permission/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java similarity index 97% rename from spring-security-custom-permission/src/test/java/org/baeldung/web/CustomUserDetailsServiceTest.java rename to spring-security-custom-permission/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java index fbc0c20144..616e80e6e9 100644 --- a/spring-security-custom-permission/src/test/java/org/baeldung/web/CustomUserDetailsServiceTest.java +++ b/spring-security-custom-permission/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java @@ -7,9 +7,9 @@ import org.baeldung.config.PersistenceConfig; import org.baeldung.config.SecurityConfig; import org.baeldung.persistence.dao.UserRepository; import org.baeldung.persistence.model.User; +import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.After; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.security.authentication.AuthenticationProvider; @@ -23,7 +23,7 @@ import org.springframework.test.context.web.WebAppConfiguration; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = { MvcConfig.class, SecurityConfig.class, PersistenceConfig.class }) @WebAppConfiguration -public class CustomUserDetailsServiceTest { +public class CustomUserDetailsServiceIntegrationTest { public static final String USERNAME = "user"; public static final String PASSWORD = "pass"; @@ -34,10 +34,12 @@ public class CustomUserDetailsServiceTest { @Autowired AuthenticationProvider authenticationProvider; - + @Autowired PasswordEncoder passwordEncoder; + // + @Test public void givenExistingUser_whenAuthenticate_thenRetrieveFromDb() { User user = new User(); @@ -63,7 +65,9 @@ public class CustomUserDetailsServiceTest { UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(USERNAME2, PASSWORD); authenticationProvider.authenticate(auth); } - + + // + @After public void tearDown() { myUserRepository.removeUserByUsername(USERNAME);