Sfoglia il codice sorgente

Merge 5007e64e791bc48d84ec5c07ed87b7763dd1193e into 700be64d6f52f449cd218a7217e93490be962246

Marten Deinum 8 anni fa
parent
commit
4fa1a20287
No account linked to committer's email
19 ha cambiato i file con 82 aggiunte e 74 eliminazioni
  1. 23
    9
      pom.xml
  2. 20
    16
      src/main/config/checkstyle.xml
  3. 1
    2
      src/main/java/com/pathfinder/api/GraphTraversalService.java
  4. 2
    2
      src/main/java/se/citerus/dddsample/domain/model/cargo/Cargo.java
  5. 0
    2
      src/main/java/se/citerus/dddsample/domain/model/cargo/CargoRepository.java
  6. 4
    5
      src/main/java/se/citerus/dddsample/interfaces/booking/facade/BookingServiceFacade.java
  7. 2
    2
      src/main/java/se/citerus/dddsample/interfaces/booking/facade/internal/BookingServiceFacadeImpl.java
  8. 2
    3
      src/main/resources/application.properties
  9. 2
    2
      src/main/resources/context-infrastructure-messaging.xml
  10. 11
    12
      src/main/resources/context-infrastructure-persistence.xml
  11. 2
    5
      src/main/resources/context-interfaces.xml
  12. 0
    2
      src/main/resources/hibernate.cfg.xml
  13. 3
    2
      src/test/java/se/citerus/dddsample/application/BookingServiceTest.java
  14. 1
    1
      src/test/java/se/citerus/dddsample/application/HandlingEventServiceTest.java
  15. 2
    2
      src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/CargoRepositoryTest.java
  16. 2
    2
      src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/CarrierMovementRepositoryTest.java
  17. 2
    2
      src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/HandlingEventRepositoryTest.java
  18. 2
    2
      src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/LocationRepositoryTest.java
  19. 1
    1
      src/test/java/se/citerus/dddsample/infrastructure/routing/ExternalRoutingServiceTest.java

+ 23
- 9
pom.xml Vedi File

@@ -8,7 +8,7 @@
8 8
     <parent>
9 9
         <groupId>org.springframework.boot</groupId>
10 10
         <artifactId>spring-boot-starter-parent</artifactId>
11
-        <version>1.5.10.RELEASE</version>
11
+        <version>2.0.1.RELEASE</version>
12 12
     </parent>
13 13
     <description>This application shows a few key concepts of
14 14
         Domain Driven Design implemented in Enterprise Java.
@@ -71,8 +71,8 @@
71 71
     </scm>
72 72
     <properties>
73 73
         <java.version>1.8</java.version>
74
-        <assertj.version>3.8.0</assertj.version>
75
-        <hibernate.version>4.3.5.Final</hibernate.version>
74
+        <!--<assertj.version>3.8.0</assertj.version>-->
75
+        <!--<hibernate.version>4.3.5.Final</hibernate.version>-->
76 76
     </properties>
77 77
     <build>
78 78
         <plugins>
@@ -102,12 +102,13 @@
102 102
         <dependency>
103 103
             <groupId>org.apache.cxf</groupId>
104 104
             <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
105
-            <version>3.1.12</version>
105
+            <version>3.2.4</version>
106 106
         </dependency>
107 107
         <dependency>
108 108
             <groupId>org.hibernate</groupId>
109 109
             <artifactId>hibernate-core</artifactId>
110 110
         </dependency>
111
+
111 112
         <dependency>
112 113
             <groupId>commons-collections</groupId>
113 114
             <artifactId>commons-collections</artifactId>
@@ -116,16 +117,16 @@
116 117
         <dependency>
117 118
             <groupId>commons-lang</groupId>
118 119
             <artifactId>commons-lang</artifactId>
119
-            <version>2.3</version>
120
+            <version>2.6</version>
120 121
         </dependency>
121 122
         <dependency>
122 123
             <groupId>commons-io</groupId>
123 124
             <artifactId>commons-io</artifactId>
124
-            <version>2.4</version>
125
+            <version>2.6</version>
125 126
         </dependency>
126 127
         <dependency>
127
-            <groupId>commons-dbcp</groupId>
128
-            <artifactId>commons-dbcp</artifactId>
128
+            <groupId>com.zaxxer</groupId>
129
+            <artifactId>HikariCP</artifactId>
129 130
         </dependency>
130 131
         <dependency>
131 132
             <groupId>org.hsqldb</groupId>
@@ -143,7 +144,7 @@
143 144
         <dependency>
144 145
             <groupId>org.apache.xbean</groupId>
145 146
             <artifactId>xbean-spring</artifactId>
146
-            <version>3.4.3</version>
147
+            <version>4.8</version>
147 148
         </dependency>
148 149
         <dependency>
149 150
             <groupId>org.springframework.boot</groupId>
@@ -160,21 +161,31 @@
160 161
             <artifactId>selenium-java</artifactId>
161 162
             <scope>test</scope>
162 163
         </dependency>
164
+        <dependency>
165
+            <groupId>org.seleniumhq.selenium</groupId>
166
+            <artifactId>htmlunit-driver</artifactId>
167
+        </dependency>
163 168
     </dependencies>
164 169
 
165 170
     <reporting>
166 171
         <plugins>
167 172
             <!-- Javadoc -->
168 173
             <plugin>
174
+                <groupId>org.apache.maven.plugins</groupId>
169 175
                 <artifactId>maven-javadoc-plugin</artifactId>
176
+                <version>3.0.0</version>
170 177
             </plugin>
171 178
             <!-- Source code cross reference -->
172 179
             <plugin>
180
+                <groupId>org.apache.maven.plugins</groupId>
173 181
                 <artifactId>maven-jxr-plugin</artifactId>
182
+                <version>2.5</version>
174 183
             </plugin>
175 184
             <!-- Test report -->
176 185
             <plugin>
186
+                <groupId>org.apache.maven.plugins</groupId>
177 187
                 <artifactId>maven-surefire-report-plugin</artifactId>
188
+                <version>2.20.1</version>
178 189
             </plugin>
179 190
             <!-- Test coverage -->
180 191
             <plugin>
@@ -183,11 +194,14 @@
183 194
             </plugin>
184 195
             <!-- CheckStyle report -->
185 196
             <plugin>
197
+                <groupId>org.apache.maven.plugins</groupId>
186 198
                 <artifactId>maven-checkstyle-plugin</artifactId>
199
+                <version>2.17</version>
187 200
                 <configuration>
188 201
                     <configLocation>src/main/config/checkstyle.xml</configLocation>
189 202
                     <!-- Java source code generated from WSDL -->
190 203
                     <excludes>**/com/aggregator/**/*</excludes>
204
+                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
191 205
                 </configuration>
192 206
             </plugin>
193 207
         </plugins>

+ 20
- 16
src/main/config/checkstyle.xml Vedi File

@@ -18,8 +18,8 @@
18 18
  -->
19 19
 
20 20
 <!DOCTYPE module PUBLIC
21
-    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
22
-    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
21
+        "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
22
+        "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
23 23
 
24 24
 <!--
25 25
 
@@ -52,7 +52,9 @@
52 52
 
53 53
     <!-- Checks that a package.html file exists for each package.     -->
54 54
     <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
55
-    <module name="PackageHtml"/>
55
+    <module name="JavadocPackage">
56
+        <property name="allowLegacy" value="true" />
57
+    </module>
56 58
 
57 59
     <!-- Checks whether files end with a new line.                        -->
58 60
     <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
@@ -62,6 +64,15 @@
62 64
     <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
63 65
     <module name="Translation"/>
64 66
 
67
+    <!-- Checks for Size Violations.                    -->
68
+    <!-- See http://checkstyle.sf.net/config_sizes.html -->
69
+    <module name="FileLength"/>
70
+    <module name="FileTabCharacter"/>
71
+
72
+    <module name="RegexpSingleline">
73
+        <property name="format" value="\s+$"/>
74
+        <property name="message" value="Line has trailing spaces."/>
75
+    </module>
65 76
 
66 77
     <module name="TreeWalker">
67 78
 
@@ -112,15 +123,14 @@
112 123
         <!-- Checks for imports                              -->
113 124
         <!-- See http://checkstyle.sf.net/config_import.html -->
114 125
         <module name="AvoidStarImport"/>
115
-        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
126
+        <module name="IllegalImport">
127
+            <property name="illegalPkgs" value="sun.*, org.apache.commons.logging"/>
128
+        </module>
129
+
116 130
         <module name="RedundantImport"/>
117 131
         <module name="UnusedImports"/>
118 132
 
119 133
 
120
-        <!-- Checks for Size Violations.                    -->
121
-        <!-- See http://checkstyle.sf.net/config_sizes.html -->
122
-        <module name="FileLength"/>
123
-
124 134
         <module name="LineLength">
125 135
          <property name="max" value="120"/>
126 136
         </module>
@@ -146,7 +156,7 @@
146 156
         
147 157
         <module name="WhitespaceAfter">
148 158
           <!-- Default tokens and additional GENERIC_END -->
149
-          <property name="tokens" value="COMMA, SEMI, TYPECAST, GENERIC_END"/>
159
+          <property name="tokens" value="COMMA, SEMI, TYPECAST"/>
150 160
         </module>
151 161
         
152 162
         <module name="WhitespaceAround">
@@ -165,7 +175,6 @@
165 175
         <module name="OperatorWrap"/>
166 176
         <module name="ParenPad"/>
167 177
         <module name="TypecastParenPad"/>
168
-        <module name="TabCharacter"/>
169 178
 
170 179
 
171 180
         <!-- Modifier Checks                                    -->
@@ -185,14 +194,12 @@
185 194
 
186 195
         <!-- Checks for common coding problems               -->
187 196
         <!-- See http://checkstyle.sf.net/config_coding.html -->
188
-        <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
189 197
         <module name="EmptyStatement"/>
190 198
         <module name="EqualsHashCode"/>
191 199
         <module name="IllegalInstantiation"/>
192 200
         <module name="InnerAssignment"/>
193 201
         <module name="MagicNumber"/>
194 202
         <module name="MissingSwitchDefault"/>
195
-        <module name="RedundantThrows"/>
196 203
         <module name="SimplifyBooleanExpression"/>
197 204
         <module name="SimplifyBooleanReturn"/>
198 205
 
@@ -209,10 +216,7 @@
209 216
         <!-- See http://checkstyle.sf.net/config_misc.html -->
210 217
         <module name="ArrayTypeStyle"/>
211 218
         <module name="FinalParameters"/>
212
-        <module name="GenericIllegalRegexp">
213
-            <property name="format" value="\s+$"/>
214
-            <property name="message" value="Line has trailing spaces."/>
215
-        </module>
219
+
216 220
         <module name="TodoComment"/>
217 221
         <module name="UpperEll"/>
218 222
 

+ 1
- 2
src/main/java/com/pathfinder/api/GraphTraversalService.java Vedi File

@@ -1,7 +1,6 @@
1 1
 package com.pathfinder.api;
2 2
 
3 3
 import java.rmi.Remote;
4
-import java.rmi.RemoteException;
5 4
 import java.util.List;
6 5
 import java.util.Properties;
7 6
 
@@ -17,7 +16,7 @@ public interface GraphTraversalService extends Remote {
17 16
    * @param destination destination point
18 17
    * @param limitations restrictions on the path selection, as key-value according to some API specification
19 18
    * @return A list of transit paths
20
-   * @throws RemoteException RMI problem
19
+   * @throws java.rmi.RemoteException RMI problem
21 20
    */
22 21
   List<TransitPath> findShortestPath(String origin,
23 22
                                      String destination,

+ 2
- 2
src/main/java/se/citerus/dddsample/domain/model/cargo/Cargo.java Vedi File

@@ -1,7 +1,7 @@
1 1
 package se.citerus.dddsample.domain.model.cargo;
2 2
 
3 3
 import org.apache.commons.lang.Validate;
4
-import se.citerus.dddsample.domain.model.handling.HandlingEvent;
4
+
5 5
 import se.citerus.dddsample.domain.model.handling.HandlingHistory;
6 6
 import se.citerus.dddsample.domain.model.location.Location;
7 7
 import se.citerus.dddsample.domain.shared.DomainObjectUtils;
@@ -140,7 +140,7 @@ public class Cargo implements Entity<Cargo> {
140 140
    * {@link RouteSpecification} and {@link Itinerary} are both inside the Cargo
141 141
    * aggregate, so changes to them cause the status to be updated <b>synchronously</b>,
142 142
    * but changes to the delivery history (when a cargo is handled) cause the status update
143
-   * to happen <b>asynchronously</b> since {@link HandlingEvent} is in a different aggregate.
143
+   * to happen <b>asynchronously</b> since {@link se.citerus.dddsample.domain.model.handling.HandlingEvent} is in a different aggregate.
144 144
    *
145 145
    * @param handlingHistory handling history
146 146
    */

+ 0
- 2
src/main/java/se/citerus/dddsample/domain/model/cargo/CargoRepository.java Vedi File

@@ -1,7 +1,5 @@
1 1
 package se.citerus.dddsample.domain.model.cargo;
2 2
 
3
-import org.springframework.transaction.annotation.Transactional;
4
-
5 3
 import java.util.List;
6 4
 
7 5
 public interface CargoRepository {

+ 4
- 5
src/main/java/se/citerus/dddsample/interfaces/booking/facade/BookingServiceFacade.java Vedi File

@@ -1,14 +1,13 @@
1 1
 package se.citerus.dddsample.interfaces.booking.facade;
2 2
 
3
-import se.citerus.dddsample.interfaces.booking.facade.dto.CargoRoutingDTO;
4
-import se.citerus.dddsample.interfaces.booking.facade.dto.LocationDTO;
5
-import se.citerus.dddsample.interfaces.booking.facade.dto.RouteCandidateDTO;
6
-
7
-import java.rmi.Remote;
8 3
 import java.rmi.RemoteException;
9 4
 import java.util.Date;
10 5
 import java.util.List;
11 6
 
7
+import se.citerus.dddsample.interfaces.booking.facade.dto.CargoRoutingDTO;
8
+import se.citerus.dddsample.interfaces.booking.facade.dto.LocationDTO;
9
+import se.citerus.dddsample.interfaces.booking.facade.dto.RouteCandidateDTO;
10
+
12 11
 /**
13 12
  * This facade shields the domain layer - model, services, repositories -
14 13
  * from concerns about such things as the user interface.

+ 2
- 2
src/main/java/se/citerus/dddsample/interfaces/booking/facade/internal/BookingServiceFacadeImpl.java Vedi File

@@ -1,6 +1,5 @@
1 1
 package se.citerus.dddsample.interfaces.booking.facade.internal;
2 2
 
3
-import org.apache.log4j.Logger;
4 3
 import se.citerus.dddsample.application.BookingService;
5 4
 import se.citerus.dddsample.domain.model.cargo.Cargo;
6 5
 import se.citerus.dddsample.domain.model.cargo.CargoRepository;
@@ -23,6 +22,8 @@ import java.util.ArrayList;
23 22
 import java.util.Date;
24 23
 import java.util.List;
25 24
 
25
+import org.slf4j.Logger;
26
+import org.slf4j.LoggerFactory;
26 27
 
27 28
 /**
28 29
  * This implementation has additional support from the infrastructure, for exposing as an RMI
@@ -36,7 +37,6 @@ public class BookingServiceFacadeImpl implements BookingServiceFacade {
36 37
   private LocationRepository locationRepository;
37 38
   private CargoRepository cargoRepository;
38 39
   private VoyageRepository voyageRepository;
39
-  private final Logger logger = Logger.getLogger(BookingServiceFacadeImpl.class);
40 40
 
41 41
   @Override
42 42
   public List<LocationDTO> listShippingLocations() {

+ 2
- 3
src/main/resources/application.properties Vedi File

@@ -1,6 +1,5 @@
1
-server.contextPath=/dddsample
1
+server.servlet.context-path=/dddsample
2 2
 cxf.path=/ws
3 3
 
4
-logging.level.org.hibernate.SQL=debug
5
-logging.level.org.hibernate.hbm2ddl=debug
4
+logging.level.org.hibernate.SQL=info
6 5
 logging.level.net.sf.ehcache.config.ConfigurationFactory=error

+ 2
- 2
src/main/resources/context-infrastructure-messaging.xml Vedi File

@@ -5,8 +5,8 @@
5 5
        xmlns:amq="http://activemq.apache.org/schema/core"
6 6
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7 7
        xsi:schemaLocation="
8
-        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
9
-        http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-2.5.xsd
8
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
+        http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
10 10
         http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
11 11
 
12 12
   <!-- JMS messaging -->

+ 11
- 12
src/main/resources/context-infrastructure-persistence.xml Vedi File

@@ -2,32 +2,31 @@
2 2
 
3 3
 <beans xmlns="http://www.springframework.org/schema/beans"
4 4
        xmlns:tx="http://www.springframework.org/schema/tx"
5
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
6 6
        xsi:schemaLocation="
7
-        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
8
-        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
7
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
8
+        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
9
+        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
9 10
 
10 11
   <!-- Persistence - database, Hibernate, transactions, repository implementations -->
11 12
 
12
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
13
-    <property name="location" value="classpath:/jdbc.properties"/>
14
-  </bean>
13
+  <context:property-placeholder location="classpath:/jdbc.properties" />
15 14
 
16
-  <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
17
-    <property name="url" value="${hibernate.connection.url}"/>
15
+  <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource">
16
+    <property name="jdbcUrl" value="${hibernate.connection.url}"/>
18 17
     <property name="driverClassName" value="${hibernate.connection.driver_class}"/>
19 18
     <property name="username" value="${hibernate.connection.username}"/>
20 19
     <property name="password" value="${hibernate.connection.password}"/>
21
-    <property name="initialSize" value="4"/>
22
-    <property name="defaultAutoCommit" value="false"/>
20
+    <property name="minimumIdle" value="4"/>
21
+    <property name="autoCommit" value="false"/>
23 22
   </bean>
24 23
 
25
-  <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
24
+  <bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
26 25
     <property name="dataSource" ref="dataSource"/>
27 26
     <property name="configLocation" value="classpath:/hibernate.cfg.xml"/>
28 27
   </bean>
29 28
 
30
-  <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
29
+  <bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
31 30
     <property name="sessionFactory" ref="sessionFactory"/>
32 31
   </bean>
33 32
 

+ 2
- 5
src/main/resources/context-interfaces.xml Vedi File

@@ -8,12 +8,10 @@
8 8
        xsi:schemaLocation="http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
9 9
                            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
10 10
                            http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
11
-                           http://www.springframework.org/schema/mvc
12
-                           http://www.springframework.org/schema/mvc/spring-mvc.xsd">
11
+                           http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
13 12
 
14 13
     <import resource="classpath:META-INF/cxf/cxf.xml"/>
15 14
 
16
-
17 15
     <!-- Handling report web service -->
18 16
 
19 17
     <jaxws:endpoint id="jax-ws.http" implementor="#handlingReportService" address="/RegisterEvent"/>
@@ -22,7 +20,6 @@
22 20
         <property name="applicationEvents" ref="applicationEvents"/>
23 21
     </bean>
24 22
 
25
-
26 23
     <!-- File upload directory scanner -->
27 24
 
28 25
     <task:scheduled-tasks scheduler="myScheduler">
@@ -70,7 +67,7 @@
70 67
     </bean>
71 68
 
72 69
     <mvc:interceptors>
73
-        <bean id="openSessionInViewInterceptor" class="org.springframework.orm.hibernate4.support.OpenSessionInViewInterceptor">
70
+        <bean id="openSessionInViewInterceptor" class="org.springframework.orm.hibernate5.support.OpenSessionInViewInterceptor">
74 71
             <property name="sessionFactory" ref="sessionFactory"/>
75 72
         </bean>
76 73
     </mvc:interceptors>

+ 0
- 2
src/main/resources/hibernate.cfg.xml Vedi File

@@ -8,8 +8,6 @@
8 8
 
9 9
   <session-factory>
10 10
     <!-- Properties defined here are shared between test and production -->
11
-    <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
12
-    
13 11
     <mapping resource="se/citerus/dddsample/infrastructure/persistence/hibernate/Cargo.hbm.xml" />
14 12
     <mapping resource="se/citerus/dddsample/infrastructure/persistence/hibernate/Voyage.hbm.xml" />
15 13
     <mapping resource="se/citerus/dddsample/infrastructure/persistence/hibernate/Leg.hbm.xml" />

+ 3
- 2
src/test/java/se/citerus/dddsample/application/BookingServiceTest.java Vedi File

@@ -1,8 +1,9 @@
1 1
 package se.citerus.dddsample.application;
2 2
 
3 3
 import static org.assertj.core.api.Assertions.assertThat;
4
-import static org.mockito.Matchers.any;
5
-import static org.mockito.Matchers.isA;
4
+
5
+import static org.mockito.ArgumentMatchers.any;
6
+import static org.mockito.ArgumentMatchers.isA;
6 7
 import static org.mockito.Mockito.mock;
7 8
 import static org.mockito.Mockito.times;
8 9
 import static org.mockito.Mockito.verify;

+ 1
- 1
src/test/java/se/citerus/dddsample/application/HandlingEventServiceTest.java Vedi File

@@ -1,6 +1,6 @@
1 1
 package se.citerus.dddsample.application;
2 2
 
3
-import static org.mockito.Matchers.isA;
3
+import static org.mockito.ArgumentMatchers.isA;
4 4
 import static org.mockito.Mockito.mock;
5 5
 import static org.mockito.Mockito.times;
6 6
 import static org.mockito.Mockito.verify;

+ 2
- 2
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/CargoRepositoryTest.java Vedi File

@@ -25,9 +25,9 @@ import org.junit.Test;
25 25
 import org.junit.runner.RunWith;
26 26
 import org.springframework.beans.factory.annotation.Autowired;
27 27
 import org.springframework.jdbc.core.JdbcTemplate;
28
-import org.springframework.orm.hibernate4.HibernateTransactionManager;
29 28
 import org.springframework.test.context.ContextConfiguration;
30 29
 import org.springframework.test.context.junit4.SpringRunner;
30
+import org.springframework.transaction.PlatformTransactionManager;
31 31
 import org.springframework.transaction.annotation.Transactional;
32 32
 import org.springframework.transaction.support.TransactionTemplate;
33 33
 
@@ -71,7 +71,7 @@ public class CargoRepositoryTest {
71 71
     private DataSource dataSource;
72 72
 
73 73
     @Autowired
74
-    private HibernateTransactionManager transactionManager;
74
+    private PlatformTransactionManager transactionManager;
75 75
 
76 76
     private JdbcTemplate jdbcTemplate;
77 77
 

+ 2
- 2
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/CarrierMovementRepositoryTest.java Vedi File

@@ -10,9 +10,9 @@ import org.junit.Test;
10 10
 import org.junit.runner.RunWith;
11 11
 import org.springframework.beans.factory.annotation.Autowired;
12 12
 import org.springframework.jdbc.core.JdbcTemplate;
13
-import org.springframework.orm.hibernate4.HibernateTransactionManager;
14 13
 import org.springframework.test.context.ContextConfiguration;
15 14
 import org.springframework.test.context.junit4.SpringRunner;
15
+import org.springframework.transaction.PlatformTransactionManager;
16 16
 import org.springframework.transaction.annotation.Transactional;
17 17
 import org.springframework.transaction.support.TransactionTemplate;
18 18
 
@@ -36,7 +36,7 @@ public class CarrierMovementRepositoryTest {
36 36
     private DataSource dataSource;
37 37
 
38 38
     @Autowired
39
-    private HibernateTransactionManager transactionManager;
39
+    private PlatformTransactionManager transactionManager;
40 40
 
41 41
     private JdbcTemplate jdbcTemplate;
42 42
 

+ 2
- 2
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/HandlingEventRepositoryTest.java Vedi File

@@ -17,9 +17,9 @@ import org.junit.Test;
17 17
 import org.junit.runner.RunWith;
18 18
 import org.springframework.beans.factory.annotation.Autowired;
19 19
 import org.springframework.jdbc.core.JdbcTemplate;
20
-import org.springframework.orm.hibernate4.HibernateTransactionManager;
21 20
 import org.springframework.test.context.ContextConfiguration;
22 21
 import org.springframework.test.context.junit4.SpringRunner;
22
+import org.springframework.transaction.PlatformTransactionManager;
23 23
 import org.springframework.transaction.annotation.Transactional;
24 24
 import org.springframework.transaction.support.TransactionTemplate;
25 25
 
@@ -54,7 +54,7 @@ public class HandlingEventRepositoryTest {
54 54
     private DataSource dataSource;
55 55
 
56 56
     @Autowired
57
-    private HibernateTransactionManager transactionManager;
57
+    private PlatformTransactionManager transactionManager;
58 58
 
59 59
     private JdbcTemplate jdbcTemplate;
60 60
 

+ 2
- 2
src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/LocationRepositoryTest.java Vedi File

@@ -11,9 +11,9 @@ import org.junit.Test;
11 11
 import org.junit.runner.RunWith;
12 12
 import org.springframework.beans.factory.annotation.Autowired;
13 13
 import org.springframework.jdbc.core.JdbcTemplate;
14
-import org.springframework.orm.hibernate4.HibernateTransactionManager;
15 14
 import org.springframework.test.context.ContextConfiguration;
16 15
 import org.springframework.test.context.junit4.SpringRunner;
16
+import org.springframework.transaction.PlatformTransactionManager;
17 17
 import org.springframework.transaction.annotation.Transactional;
18 18
 import org.springframework.transaction.support.TransactionTemplate;
19 19
 
@@ -33,7 +33,7 @@ public class LocationRepositoryTest {
33 33
     private DataSource dataSource;
34 34
 
35 35
     @Autowired
36
-    private HibernateTransactionManager transactionManager;
36
+    private PlatformTransactionManager transactionManager;
37 37
 
38 38
     @Before
39 39
     public void setup() {

+ 1
- 1
src/test/java/se/citerus/dddsample/infrastructure/routing/ExternalRoutingServiceTest.java Vedi File

@@ -18,7 +18,7 @@ import java.util.Date;
18 18
 import java.util.List;
19 19
 
20 20
 import static org.assertj.core.api.Assertions.assertThat;
21
-import static org.mockito.Matchers.isA;
21
+import static org.mockito.ArgumentMatchers.isA;
22 22
 import static org.mockito.Mockito.mock;
23 23
 import static org.mockito.Mockito.when;
24 24
 import static se.citerus.dddsample.domain.model.location.SampleLocations.*;