File tree Expand file tree Collapse file tree
src/test/java/org/baeldung/spring/persistence/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change 182182
183183 <properties >
184184 <!-- Spring -->
185- <org .springframework.version>3.2.6 .RELEASE</org .springframework.version>
185+ <org .springframework.version>4.0.0 .RELEASE</org .springframework.version>
186186 <org .springframework.security.version>3.2.0.RELEASE</org .springframework.security.version>
187187 <javassist .version>3.18.1-GA</javassist .version>
188188
Original file line number Diff line number Diff line change 55import org .baeldung .persistence .model .Foo ;
66import org .baeldung .persistence .service .IFooService ;
77import org .baeldung .spring .PersistenceConfig ;
8- import org .hibernate .exception .DataException ;
98import org .junit .Ignore ;
109import org .junit .Test ;
1110import org .junit .runner .RunWith ;
1211import org .springframework .beans .factory .annotation .Autowired ;
12+ import org .springframework .dao .DataAccessException ;
1313import org .springframework .dao .DataIntegrityViolationException ;
1414import org .springframework .dao .InvalidDataAccessApiUsageException ;
1515import org .springframework .test .context .ContextConfiguration ;
@@ -53,7 +53,7 @@ public final void whenSameEntityIsCreatedTwice_thenDataException() {
5353 service .create (entity );
5454 }
5555
56- @ Test (expected = DataException .class )
56+ @ Test (expected = DataAccessException .class )
5757 public final void temp_whenInvalidEntityIsCreated_thenDataException () {
5858 service .create (new Foo (randomAlphabetic (2048 )));
5959 }
You can’t perform that action at this time.
0 commit comments