Skip to content

Commit ebc25b2

Browse files
author
Eugen Paraschiv
committed
minor cleanup work
1 parent 6536e39 commit ebc25b2

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

‎bootique/dependency-reduced-pom.xml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@
2828
<dependency>
2929
<groupId>junit</groupId>
3030
<artifactId>junit</artifactId>
31-
<version>3.8.1</version>
31+
<version>4.12</version>
3232
<scope>test</scope>
33+
<exclusions>
34+
<exclusion>
35+
<artifactId>hamcrest-core</artifactId>
36+
<groupId>org.hamcrest</groupId>
37+
</exclusion>
38+
</exclusions>
3339
</dependency>
3440
</dependencies>
3541
<dependencyManagement>

‎persistence-modules/spring-hibernate-5/src/test/java/com/baeldung/hibernate/manytomany/HibernateManyToManyAnnotationJavaConfigMainIntegrationTest.java‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.baeldung.hibernate.manytomany;
22

3-
43
import java.util.HashSet;
54
import java.util.Set;
65
import org.hibernate.Session;
@@ -17,18 +16,15 @@
1716
import com.baeldung.hibernate.manytomany.model.Project;
1817
import com.baeldung.manytomany.spring.PersistenceConfig;
1918

20-
21-
2219
@RunWith(SpringJUnit4ClassRunner.class)
23-
@ContextConfiguration(classes = {PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class)
20+
@ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class)
2421
public class HibernateManyToManyAnnotationJavaConfigMainIntegrationTest {
2522

2623
@Autowired
2724
private SessionFactory sessionFactory;
2825

2926
private Session session;
3027

31-
3228
@Before
3329
public final void before() {
3430
session = sessionFactory.openSession();
@@ -43,11 +39,11 @@ public final void after() {
4339

4440
@Test
4541
public final void whenEntitiesAreCreated_thenNoExceptions() {
46-
Set<Project> projects = new HashSet<Project>();
47-
projects.add(new Project("IT Project"));
48-
projects.add(new Project("Networking Project"));
49-
session.persist(new Employee("Peter", "Oven", projects));
50-
session.persist(new Employee("Allan", "Norman", projects));
42+
Set<Project> projects = new HashSet<Project>();
43+
projects.add(new Project("IT Project"));
44+
projects.add(new Project("Networking Project"));
45+
session.persist(new Employee("Peter", "Oven", projects));
46+
session.persist(new Employee("Allan", "Norman", projects));
5147
}
5248

5349
}

0 commit comments

Comments
 (0)