Merge branch 'master' of https://github.com/iaforek/tutorials into iaforek-master
This commit is contained in:
@@ -33,3 +33,5 @@ spring-openid/src/main/resources/application.properties
|
|||||||
spring-security-openid/src/main/resources/application.properties
|
spring-security-openid/src/main/resources/application.properties
|
||||||
|
|
||||||
spring-all/*.log
|
spring-all/*.log
|
||||||
|
core-java/src/main/java/com/baeldung/string/RemoveLastChar.java
|
||||||
|
core-java/src/test/java/com/baeldung/string/RemoveLastCharTest.java
|
||||||
|
|||||||
@@ -47,24 +47,5 @@
|
|||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
<version>1.7.21</version>
|
<version>1.7.21</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>4.12</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.2</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.7</source>
|
|
||||||
<target>1.7</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
||||||
+1
-8
@@ -18,8 +18,6 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -28,11 +26,6 @@
|
|||||||
<artifactId>twitter4j-stream</artifactId>
|
<artifactId>twitter4j-stream</artifactId>
|
||||||
<version>4.0.6</version>
|
<version>4.0.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>4.12</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -46,7 +39,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.19.1</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/ApplicationTest.java</exclude>
|
<exclude>**/ApplicationTest.java</exclude>
|
||||||
|
|||||||
+1
-29
@@ -6,8 +6,6 @@
|
|||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
|
<exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
|
||||||
<lombok.version>1.16.12</lombok.version>
|
<lombok.version>1.16.12</lombok.version>
|
||||||
<commons-math3.version>3.6.1</commons-math3.version>
|
<commons-math3.version>3.6.1</commons-math3.version>
|
||||||
@@ -25,13 +23,7 @@
|
|||||||
<artifactId>commons-math3</artifactId>
|
<artifactId>commons-math3</artifactId>
|
||||||
<version>${commons-math3.version}</version>
|
<version>${commons-math3.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>${lombok.version}</version>
|
<version>${lombok.version}</version>
|
||||||
@@ -47,31 +39,11 @@
|
|||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
<version>${exec-maven-plugin.version}</version>
|
<version>${exec-maven-plugin.version}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*LongRunningUnitTest.java</exclude>
|
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|||||||
@@ -26,31 +26,9 @@
|
|||||||
<artifactId>bval-extras</artifactId>
|
<artifactId>bval-extras</artifactId>
|
||||||
<version>${bval.version}</version>
|
<version>${bval.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<bval.version>1.1.2</bval.version>
|
<bval.version>1.1.2</bval.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
@@ -20,33 +20,13 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
|
<exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>install</defaultGoal>
|
<defaultGoal>install</defaultGoal>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
|||||||
@@ -16,18 +16,6 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- logging -->
|
<!-- logging -->
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${org.slf4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>${logback.version}</version>
|
|
||||||
<!-- <scope>runtime</scope> -->
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
@@ -36,14 +24,6 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- test scoped -->
|
<!-- test scoped -->
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hamcrest</groupId>
|
<groupId>org.hamcrest</groupId>
|
||||||
<artifactId>hamcrest-core</artifactId>
|
<artifactId>hamcrest-core</artifactId>
|
||||||
@@ -131,35 +111,6 @@
|
|||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.7</source>
|
|
||||||
<target>1.7</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<forkCount>3</forkCount>
|
|
||||||
<reuseForks>true</reuseForks>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
|
||||||
<exclude>**/*LiveTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
@@ -203,19 +154,11 @@
|
|||||||
<avalon-framework.version>4.3</avalon-framework.version>
|
<avalon-framework.version>4.3</avalon-framework.version>
|
||||||
<dbdoclet.version>8.0.2</dbdoclet.version>
|
<dbdoclet.version>8.0.2</dbdoclet.version>
|
||||||
<jtidy.version>r938</jtidy.version>
|
<jtidy.version>r938</jtidy.version>
|
||||||
<!-- logging -->
|
|
||||||
<org.slf4j.version>1.7.21</org.slf4j.version>
|
|
||||||
<logback.version>1.1.7</logback.version>
|
|
||||||
|
|
||||||
<!-- testing -->
|
<!-- testing -->
|
||||||
<org.hamcrest.version>1.3</org.hamcrest.version>
|
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<mockito.version>1.10.19</mockito.version>
|
<mockito.version>1.10.19</mockito.version>
|
||||||
|
|
||||||
<!-- maven plugins -->
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
+1
-23
@@ -12,33 +12,11 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<poi.version>3.15</poi.version>
|
<poi.version>3.15</poi.version>
|
||||||
<jexcel.version>1.0.6</jexcel.version>
|
<jexcel.version>1.0.6</jexcel.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
|
|||||||
@@ -12,11 +12,6 @@
|
|||||||
<artifactId>parent-modules</artifactId>
|
<artifactId>parent-modules</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -24,33 +19,5 @@
|
|||||||
<artifactId>solr-solrj</artifactId>
|
<artifactId>solr-solrj</artifactId>
|
||||||
<version>6.4.0</version>
|
<version>6.4.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>2.3.2</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
|
||||||
<exclude>**/*LiveTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
||||||
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.versin>1.8</java.versin>
|
<java.versin>1.8</java.versin>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<thrift.version>0.10.0</thrift.version>
|
<thrift.version>0.10.0</thrift.version>
|
||||||
<maven-thrift.version>0.1.11</maven-thrift.version>
|
<maven-thrift.version>0.1.11</maven-thrift.version>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -33,13 +31,6 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
@@ -51,15 +42,6 @@
|
|||||||
<build>
|
<build>
|
||||||
<defaultGoal>install</defaultGoal>
|
<defaultGoal>install</defaultGoal>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
|||||||
+1
-39
@@ -18,24 +18,13 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<jdk.version>1.8</jdk.version>
|
<jdk.version>1.8</jdk.version>
|
||||||
<jstl.version>1.2</jstl.version>
|
<jstl.version>1.2</jstl.version>
|
||||||
<junit.version>4.11</junit.version>
|
|
||||||
<logback.version>1.0.13</logback.version>
|
|
||||||
<jcl-over-slf4j.version>1.7.5</jcl-over-slf4j.version>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<maven-war-plugin.version>2.6</maven-war-plugin.version>
|
<maven-war-plugin.version>2.6</maven-war-plugin.version>
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
<org.apache.httpcomponents.version>4.5.2</org.apache.httpcomponents.version>
|
<org.apache.httpcomponents.version>4.5.2</org.apache.httpcomponents.version>
|
||||||
<velocity-version>1.7</velocity-version>
|
<velocity-version>1.7</velocity-version>
|
||||||
<velocity-tools-version>2.0</velocity-tools-version>
|
<velocity-tools-version>2.0</velocity-tools-version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
<artifactId>velocity</artifactId>
|
<artifactId>velocity</artifactId>
|
||||||
@@ -49,12 +38,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
<version>${jcl-over-slf4j.version}</version>
|
<version>${org.slf4j.version}</version>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>${logback.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
@@ -78,15 +62,6 @@
|
|||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>${jdk.version}</source>
|
|
||||||
<target>${jdk.version}</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
@@ -95,19 +70,6 @@
|
|||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*LiveTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
<systemPropertyVariables>
|
|
||||||
</systemPropertyVariables>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -11,21 +11,6 @@
|
|||||||
<artifactId>parent-modules</artifactId>
|
<artifactId>parent-modules</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>7</source>
|
|
||||||
<target>7</target>
|
|
||||||
<useIncrementalCompilation>false</useIncrementalCompilation>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -33,19 +18,10 @@
|
|||||||
<artifactId>auto-value</artifactId>
|
<artifactId>auto-value</artifactId>
|
||||||
<version>${auto-value.version}</version>
|
<version>${auto-value.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<auto-value.version>1.3</auto-value.version>
|
<auto-value.version>1.3</auto-value.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -10,18 +10,6 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>axon</artifactId>
|
<artifactId>axon</artifactId>
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -35,18 +23,10 @@
|
|||||||
<artifactId>axon-core</artifactId>
|
<artifactId>axon-core</artifactId>
|
||||||
<version>${axon.version}</version>
|
<version>${axon.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<axon.version>3.0.2</axon.version>
|
<axon.version>3.0.2</axon.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
-25
@@ -36,12 +36,6 @@
|
|||||||
<version>${weld-se-core.version}</version>
|
<version>${weld-se-core.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-test</artifactId>
|
<artifactId>spring-test</artifactId>
|
||||||
@@ -51,23 +45,6 @@
|
|||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
|
||||||
<exclude>**/*LiveTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>integration</id>
|
<id>integration</id>
|
||||||
@@ -106,8 +83,6 @@
|
|||||||
<spring.version>4.3.4.RELEASE</spring.version>
|
<spring.version>4.3.4.RELEASE</spring.version>
|
||||||
<aspectjweaver.version>1.8.9</aspectjweaver.version>
|
<aspectjweaver.version>1.8.9</aspectjweaver.version>
|
||||||
<weld-se-core.version>2.4.1.Final</weld-se-core.version>
|
<weld-se-core.version>2.4.1.Final</weld-se-core.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -80,18 +80,6 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- logging -->
|
<!-- logging -->
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${org.slf4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>${logback.version}</version>
|
|
||||||
<!-- <scope>runtime</scope> -->
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
@@ -121,13 +109,6 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hamcrest</groupId>
|
<groupId>org.hamcrest</groupId>
|
||||||
<artifactId>hamcrest-core</artifactId>
|
<artifactId>hamcrest-core</artifactId>
|
||||||
@@ -208,28 +189,6 @@
|
|||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
|
||||||
<exclude>**/*LongRunningUnitTest.java</exclude>
|
|
||||||
<exclude>**/*ManualTest.java</exclude>
|
|
||||||
<exclude>**/JdbcTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
<testFailureIgnore>true</testFailureIgnore>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
@@ -376,10 +335,6 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!-- marshalling -->
|
<!-- marshalling -->
|
||||||
<jackson.version>2.8.5</jackson.version>
|
<jackson.version>2.8.5</jackson.version>
|
||||||
|
|
||||||
<!-- logging -->
|
|
||||||
<org.slf4j.version>1.7.21</org.slf4j.version>
|
|
||||||
<logback.version>1.1.7</logback.version>
|
|
||||||
|
|
||||||
<!-- mysql -->
|
<!-- mysql -->
|
||||||
<mysql.version>6.0.6</mysql.version>
|
<mysql.version>6.0.6</mysql.version>
|
||||||
@@ -399,15 +354,10 @@
|
|||||||
|
|
||||||
<!-- testing -->
|
<!-- testing -->
|
||||||
<org.hamcrest.version>1.3</org.hamcrest.version>
|
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<mockito.version>1.10.19</mockito.version>
|
<mockito.version>1.10.19</mockito.version>
|
||||||
<assertj.version>3.6.1</assertj.version>
|
<assertj.version>3.6.1</assertj.version>
|
||||||
<avaitility.version>1.7.0</avaitility.version>
|
<avaitility.version>1.7.0</avaitility.version>
|
||||||
|
|
||||||
<!-- maven plugins -->
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
package com.baeldung.string;
|
|
||||||
|
|
||||||
public class RemoveLastChar {
|
|
||||||
public static String substring(String s) {
|
|
||||||
if (s == null || s.length() == 0) {
|
|
||||||
return s;
|
|
||||||
} else {
|
|
||||||
return (s.substring(0, s.length() - 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.baeldung.string;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public class StringHelper {
|
||||||
|
public static String withoutLastChar(String s) {
|
||||||
|
return (s == null || s.length() == 0) ? s : (s.substring(0, s.length() - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String removeLastChar(String s) {
|
||||||
|
return (s == null) ? s : s.replaceAll(".$", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String withoutLastCharacter(String s) {
|
||||||
|
return Optional.ofNullable(s)
|
||||||
|
.filter(str -> str.length() != 0)
|
||||||
|
.map(str -> str.substring(0, str.length() - 1))
|
||||||
|
.orElse(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String removeLastCharacter(String s) {
|
||||||
|
return Optional.ofNullable(s)
|
||||||
|
.map(str -> str.replaceAll(".$", ""))
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -2,7 +2,7 @@ package com.baeldung.stackoverflowerror;
|
|||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class AccountHolderUnitTest {
|
public class AccountHolderManualTest {
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void whenInstanciatingAccountHolder_thenThrowsException() {
|
public void whenInstanciatingAccountHolder_thenThrowsException() {
|
||||||
AccountHolder holder = new AccountHolder();
|
AccountHolder holder = new AccountHolder();
|
||||||
+1
-2
@@ -1,10 +1,9 @@
|
|||||||
package com.baeldung.stackoverflowerror;
|
package com.baeldung.stackoverflowerror;
|
||||||
|
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class CyclicDependancyUnitTest {
|
public class CyclicDependancyManualTest {
|
||||||
@Test
|
@Test
|
||||||
public void whenInstanciatingClassOne_thenThrowsException() {
|
public void whenInstanciatingClassOne_thenThrowsException() {
|
||||||
try {
|
try {
|
||||||
+1
-2
@@ -2,10 +2,9 @@ package com.baeldung.stackoverflowerror;
|
|||||||
|
|
||||||
import static junit.framework.TestCase.assertEquals;
|
import static junit.framework.TestCase.assertEquals;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class InfiniteRecursionWithTerminationConditionUnitTest {
|
public class InfiniteRecursionWithTerminationConditionManualTest {
|
||||||
@Test
|
@Test
|
||||||
public void givenPositiveIntNoOne_whenCalcFact_thenThrowsException() {
|
public void givenPositiveIntNoOne_whenCalcFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = 1;
|
int numToCalcFactorial = 1;
|
||||||
+16
-12
@@ -1,29 +1,33 @@
|
|||||||
package com.baeldung.stackoverflowerror;
|
package com.baeldung.stackoverflowerror;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class UnintendedInfiniteRecursionUnitTest {
|
public class UnintendedInfiniteRecursionManualTest {
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void givenPositiveIntNoOne_whenCalFact_thenThrowsException() {
|
public void givenPositiveIntNoOne_whenCalFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = 1;
|
int numToCalcFactorial= 1;
|
||||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
UnintendedInfiniteRecursion uir
|
||||||
|
= new UnintendedInfiniteRecursion();
|
||||||
|
|
||||||
uir.calculateFactorial(numToCalcFactorial);
|
uir.calculateFactorial(numToCalcFactorial);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void givenPositiveIntGtOne_whenCalcFact_thenThrowsException() {
|
public void givenPositiveIntGtOne_whenCalcFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = 2;
|
int numToCalcFactorial= 2;
|
||||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
UnintendedInfiniteRecursion uir
|
||||||
|
= new UnintendedInfiniteRecursion();
|
||||||
|
|
||||||
uir.calculateFactorial(numToCalcFactorial);
|
uir.calculateFactorial(numToCalcFactorial);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void givenNegativeInt_whenCalcFact_thenThrowsException() {
|
public void givenNegativeInt_whenCalcFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = -1;
|
int numToCalcFactorial= -1;
|
||||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
UnintendedInfiniteRecursion uir
|
||||||
|
= new UnintendedInfiniteRecursion();
|
||||||
|
|
||||||
uir.calculateFactorial(numToCalcFactorial);
|
uir.calculateFactorial(numToCalcFactorial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package com.baeldung.string;
|
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class RemoveLastCharTest {
|
|
||||||
|
|
||||||
public static final String TEST_STRING = "abcdef";
|
|
||||||
public static final String NULL_STRING = null;
|
|
||||||
public static final String EMPTY_STRING = "";
|
|
||||||
public static final String ONE_CHAR_STRING = "a";
|
|
||||||
public static final String WHITE_SPACE_AT_THE_END_STRING = "abc ";
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void givenTestString_whenSubstring_thenGetStingWithoutLastChar() {
|
|
||||||
assertEquals("abcde", RemoveLastChar.substring(TEST_STRING));
|
|
||||||
assertEquals("abcde", StringUtils.substring(TEST_STRING, 0, TEST_STRING.length() - 1));
|
|
||||||
assertEquals("abcde", StringUtils.chop(TEST_STRING));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void givenNullString_whenSubstring_thenGetNullString() {
|
|
||||||
assertEquals(NULL_STRING, RemoveLastChar.substring(NULL_STRING));
|
|
||||||
assertEquals(NULL_STRING, StringUtils.chop(NULL_STRING));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void givenEmptyString_whenSubstring_thenGetEmptyString() {
|
|
||||||
assertEquals(EMPTY_STRING, RemoveLastChar.substring(EMPTY_STRING));
|
|
||||||
assertEquals(EMPTY_STRING, StringUtils.substring(EMPTY_STRING, 0, EMPTY_STRING.length() - 1));
|
|
||||||
assertEquals(EMPTY_STRING, StringUtils.chop(EMPTY_STRING));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void givenOneCharString_whenSubstring_thenGetEmptyString() {
|
|
||||||
assertEquals(EMPTY_STRING, RemoveLastChar.substring(ONE_CHAR_STRING));
|
|
||||||
assertEquals(EMPTY_STRING, StringUtils.substring(ONE_CHAR_STRING, 0, ONE_CHAR_STRING.length() - 1));
|
|
||||||
assertEquals(EMPTY_STRING, StringUtils.chop(ONE_CHAR_STRING));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void givenStringWithWhiteSpaceAtTheEnd_whenSubstring_thenGetStringWithoutWhiteSpaceAtTheEnd() {
|
|
||||||
assertEquals("abc", RemoveLastChar.substring(WHITE_SPACE_AT_THE_END_STRING));
|
|
||||||
assertEquals("abc", StringUtils.substring(WHITE_SPACE_AT_THE_END_STRING, 0, WHITE_SPACE_AT_THE_END_STRING.length() - 1));
|
|
||||||
assertEquals("abc", StringUtils.chop(WHITE_SPACE_AT_THE_END_STRING));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package com.baeldung.string;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNotEquals;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class StringHelperTest {
|
||||||
|
|
||||||
|
public static final String TEST_STRING = "abcdef";
|
||||||
|
public static final String NULL_STRING = null;
|
||||||
|
public static final String EMPTY_STRING = "";
|
||||||
|
public static final String ONE_CHAR_STRING = "a";
|
||||||
|
public static final String WHITE_SPACE_AT_THE_END_STRING = "abc ";
|
||||||
|
public static final String NEW_LINE_AT_THE_END_STRING = "abc\n";
|
||||||
|
public static final String MULTIPLE_LINES_STRING = "abc\ndef";
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenTestString_whenSubstring_thenGetStingWithoutLastChar() {
|
||||||
|
assertEquals("abcde", StringHelper.withoutLastChar(TEST_STRING));
|
||||||
|
assertEquals("abcde", StringUtils.substring(TEST_STRING, 0, TEST_STRING.length() - 1));
|
||||||
|
assertEquals("abcde", StringUtils.chop(TEST_STRING));
|
||||||
|
assertEquals("abcde", TEST_STRING.replaceAll(".$", ""));
|
||||||
|
assertEquals("abcde", StringHelper.removeLastChar(TEST_STRING));
|
||||||
|
assertEquals("abcde", StringHelper.withoutLastCharacter(TEST_STRING));
|
||||||
|
assertEquals("abcde", StringHelper.removeLastCharacter(TEST_STRING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenNullString_whenSubstring_thenGetNullString() {
|
||||||
|
assertEquals(NULL_STRING, StringHelper.withoutLastChar(NULL_STRING));
|
||||||
|
assertEquals(NULL_STRING, StringUtils.chop(NULL_STRING));
|
||||||
|
assertEquals(NULL_STRING, StringHelper.removeLastChar(NULL_STRING));
|
||||||
|
assertEquals(NULL_STRING, StringHelper.withoutLastCharacter(NULL_STRING));
|
||||||
|
assertEquals(NULL_STRING, StringHelper.removeLastCharacter(NULL_STRING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenEmptyString_whenSubstring_thenGetEmptyString() {
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.withoutLastChar(EMPTY_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, StringUtils.substring(EMPTY_STRING, 0, EMPTY_STRING.length() - 1));
|
||||||
|
assertEquals(EMPTY_STRING, StringUtils.chop(EMPTY_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, EMPTY_STRING.replaceAll(".$", ""));
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.removeLastChar(EMPTY_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.withoutLastCharacter(EMPTY_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.removeLastCharacter(EMPTY_STRING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenOneCharString_whenSubstring_thenGetEmptyString() {
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.withoutLastChar(ONE_CHAR_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, StringUtils.substring(ONE_CHAR_STRING, 0, ONE_CHAR_STRING.length() - 1));
|
||||||
|
assertEquals(EMPTY_STRING, StringUtils.chop(ONE_CHAR_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, ONE_CHAR_STRING.replaceAll(".$", ""));
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.removeLastChar(ONE_CHAR_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.withoutLastCharacter(ONE_CHAR_STRING));
|
||||||
|
assertEquals(EMPTY_STRING, StringHelper.removeLastCharacter(ONE_CHAR_STRING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenStringWithWhiteSpaceAtTheEnd_whenSubstring_thenGetStringWithoutWhiteSpaceAtTheEnd() {
|
||||||
|
assertEquals("abc", StringHelper.withoutLastChar(WHITE_SPACE_AT_THE_END_STRING));
|
||||||
|
assertEquals("abc", StringUtils.substring(WHITE_SPACE_AT_THE_END_STRING, 0, WHITE_SPACE_AT_THE_END_STRING.length() - 1));
|
||||||
|
assertEquals("abc", StringUtils.chop(WHITE_SPACE_AT_THE_END_STRING));
|
||||||
|
assertEquals("abc", WHITE_SPACE_AT_THE_END_STRING.replaceAll(".$", ""));
|
||||||
|
assertEquals("abc", StringHelper.removeLastChar(WHITE_SPACE_AT_THE_END_STRING));
|
||||||
|
assertEquals("abc", StringHelper.withoutLastCharacter(WHITE_SPACE_AT_THE_END_STRING));
|
||||||
|
assertEquals("abc", StringHelper.removeLastCharacter(WHITE_SPACE_AT_THE_END_STRING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenStringWithNewLineAtTheEnd_whenSubstring_thenGetStringWithoutNewLine() {
|
||||||
|
assertEquals("abc", StringHelper.withoutLastChar(NEW_LINE_AT_THE_END_STRING));
|
||||||
|
assertEquals("abc", StringUtils.substring(NEW_LINE_AT_THE_END_STRING, 0, NEW_LINE_AT_THE_END_STRING.length() - 1));
|
||||||
|
assertEquals("abc", StringUtils.chop(NEW_LINE_AT_THE_END_STRING));
|
||||||
|
assertNotEquals("abc", NEW_LINE_AT_THE_END_STRING.replaceAll(".$", ""));
|
||||||
|
assertNotEquals("abc", StringHelper.removeLastChar(NEW_LINE_AT_THE_END_STRING));
|
||||||
|
assertEquals("abc", StringHelper.withoutLastCharacter(NEW_LINE_AT_THE_END_STRING));
|
||||||
|
assertNotEquals("abc", StringHelper.removeLastCharacter(NEW_LINE_AT_THE_END_STRING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenMultiLineString_whenSubstring_thenGetStringWithoutNewLine() {
|
||||||
|
assertEquals("abc\nde", StringHelper.withoutLastChar(MULTIPLE_LINES_STRING));
|
||||||
|
assertEquals("abc\nde", StringUtils.substring(MULTIPLE_LINES_STRING, 0, MULTIPLE_LINES_STRING.length() - 1));
|
||||||
|
assertEquals("abc\nde", StringUtils.chop(MULTIPLE_LINES_STRING));
|
||||||
|
assertEquals("abc\nde", MULTIPLE_LINES_STRING.replaceAll(".$", ""));
|
||||||
|
assertEquals("abc\nde", StringHelper.removeLastChar(MULTIPLE_LINES_STRING));
|
||||||
|
assertEquals("abc\nde", StringHelper.withoutLastCharacter(MULTIPLE_LINES_STRING));
|
||||||
|
assertEquals("abc\nde", StringHelper.removeLastCharacter(MULTIPLE_LINES_STRING));
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-47
@@ -47,18 +47,7 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Logging with SLF4J & LogBack -->
|
<!-- Logging -->
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${org.slf4j.version}</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>${logback.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
@@ -72,12 +61,6 @@
|
|||||||
<version>${spring-framework.version}</version>
|
<version>${spring-framework.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -88,41 +71,12 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>${java.version}</source>
|
|
||||||
<target>${java.version}</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
|
||||||
<exclude>**/*LiveTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<couchbase.client.version>2.4.0</couchbase.client.version>
|
<couchbase.client.version>2.4.0</couchbase.client.version>
|
||||||
<spring-framework.version>4.3.5.RELEASE</spring-framework.version>
|
<spring-framework.version>4.3.5.RELEASE</spring-framework.version>
|
||||||
<logback.version>1.1.8</logback.version>
|
|
||||||
<org.slf4j.version>1.7.22</org.slf4j.version>
|
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<commons-lang3.version>3.5</commons-lang3.version>
|
<commons-lang3.version>3.5</commons-lang3.version>
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+2
-17
@@ -27,10 +27,8 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!-- Explicitly declaring the source encoding eliminates the following message: -->
|
<!-- Explicitly declaring the source encoding eliminates the following message: -->
|
||||||
<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! -->
|
<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! -->
|
||||||
<project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
UTF-8</project.build.sourceEncoding>
|
|
||||||
|
|
||||||
<slf4j.version>1.7.21</slf4j.version>
|
|
||||||
<querydsl.version>3.7.4</querydsl.version>
|
<querydsl.version>3.7.4</querydsl.version>
|
||||||
<deltaspike.version>1.7.2</deltaspike.version>
|
<deltaspike.version>1.7.2</deltaspike.version>
|
||||||
|
|
||||||
@@ -41,14 +39,8 @@
|
|||||||
<jboss.bom.version>8.2.2.Final</jboss.bom.version>
|
<jboss.bom.version>8.2.2.Final</jboss.bom.version>
|
||||||
|
|
||||||
<!-- other plugin versions -->
|
<!-- other plugin versions -->
|
||||||
<version.compiler.plugin>3.6.0</version.compiler.plugin>
|
|
||||||
<surefire.plugin.version>2.19.1</surefire.plugin.version>
|
|
||||||
<war.plugin.version>2.6</war.plugin.version>
|
<war.plugin.version>2.6</war.plugin.version>
|
||||||
<apt-maven-plugin.version>1.1.3</apt-maven-plugin.version>
|
<apt-maven-plugin.version>1.1.3</apt-maven-plugin.version>
|
||||||
|
|
||||||
<!-- maven-compiler-plugin -->
|
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
@@ -153,13 +145,6 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Needed for running tests (you may also use TestNG) -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Optional, but highly recommended -->
|
<!-- Optional, but highly recommended -->
|
||||||
<!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) JPA from JUnit/TestNG -->
|
<!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) JPA from JUnit/TestNG -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -259,7 +244,7 @@
|
|||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${surefire.plugin.version}</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -31,16 +31,6 @@
|
|||||||
|
|
||||||
<!-- logging -->
|
<!-- logging -->
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${org.slf4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>${logback.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
@@ -56,13 +46,6 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hamcrest</groupId>
|
<groupId>org.hamcrest</groupId>
|
||||||
<artifactId>hamcrest-core</artifactId>
|
<artifactId>hamcrest-core</artifactId>
|
||||||
@@ -89,22 +72,6 @@
|
|||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
@@ -229,25 +196,15 @@
|
|||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- logging -->
|
|
||||||
<org.slf4j.version>1.7.21</org.slf4j.version>
|
|
||||||
<logback.version>1.1.7</logback.version>
|
|
||||||
|
|
||||||
<!-- util -->
|
<!-- util -->
|
||||||
<commons-lang3.version>3.5</commons-lang3.version>
|
<commons-lang3.version>3.5</commons-lang3.version>
|
||||||
<disruptor.version>3.3.6</disruptor.version>
|
<disruptor.version>3.3.6</disruptor.version>
|
||||||
|
|
||||||
<!-- testing -->
|
<!-- testing -->
|
||||||
<org.hamcrest.version>1.3</org.hamcrest.version>
|
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<mockito.version>1.10.19</mockito.version>
|
<mockito.version>1.10.19</mockito.version>
|
||||||
<testng.version>6.10</testng.version>
|
<testng.version>6.10</testng.version>
|
||||||
<assertj.version>3.6.1</assertj.version>
|
<assertj.version>3.6.1</assertj.version>
|
||||||
|
|
||||||
<!-- maven plugins -->
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
+1
-29
@@ -13,32 +13,13 @@
|
|||||||
<artifactId>parent-modules</artifactId>
|
<artifactId>parent-modules</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>7</source>
|
|
||||||
<target>7</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${slf4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
<version>${slf4j.version}</version>
|
<version>${org.slf4j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -52,21 +33,12 @@
|
|||||||
<artifactId>dozer</artifactId>
|
<artifactId>dozer</artifactId>
|
||||||
<version>${dozer.version}</version>
|
<version>${dozer.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<slf4j.version>1.7.21</slf4j.version>
|
|
||||||
<commons-lang3.version>3.5</commons-lang3.version>
|
<commons-lang3.version>3.5</commons-lang3.version>
|
||||||
<dozer.version>5.5.1</dozer.version>
|
<dozer.version>5.5.1</dozer.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -16,23 +16,4 @@
|
|||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
</properties>
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+8
-28
@@ -17,11 +17,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<feign.version>9.4.0</feign.version>
|
<feign.version>9.4.0</feign.version>
|
||||||
<slf4j.version>1.7.21</slf4j.version>
|
|
||||||
<lombok.version>1.16.12</lombok.version>
|
<lombok.version>1.16.12</lombok.version>
|
||||||
<junit.version>4.12</junit.version>
|
|
||||||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
|
|
||||||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
|
||||||
<spring-boot-maven-plugin.version>1.4.2.RELEASE</spring-boot-maven-plugin.version>
|
<spring-boot-maven-plugin.version>1.4.2.RELEASE</spring-boot-maven-plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@@ -46,50 +42,34 @@
|
|||||||
<artifactId>feign-slf4j</artifactId>
|
<artifactId>feign-slf4j</artifactId>
|
||||||
<version>${feign.version}</version>
|
<version>${feign.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${slf4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>${lombok.version}</version>
|
<version>${lombok.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
<version>${spring-boot-maven-plugin.version}</version>
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skipTests>true</skipTests>
|
<reuseForks>true</reuseForks>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/*IntegrationTest.java</exclude>
|
||||||
|
<exclude>**/*LiveTest.java</exclude>
|
||||||
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>${spring-boot-maven-plugin.version}</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|||||||
+4
-1
@@ -18,9 +18,12 @@ import static org.hamcrest.CoreMatchers.is;
|
|||||||
import static org.junit.Assert.assertThat;
|
import static org.junit.Assert.assertThat;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Consumes https://github.com/Baeldung/spring-hypermedia-api
|
||||||
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
public class BookClientTest {
|
public class BookClientLiveTest {
|
||||||
private BookClient bookClient;
|
private BookClient bookClient;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user