JAVA-20167 Additional changes for test MovieRepositoryIntegrationTest
This commit is contained in:
parent
b50712ae42
commit
2a4950a9d7
|
@ -120,4 +120,7 @@ libraries-2/src/test/resources/crawler4j/**
|
|||
devDb*.db
|
||||
|
||||
#jaxb
|
||||
*.xjb
|
||||
*.xjb
|
||||
|
||||
#spring-data-neo4j
|
||||
persistence-modules/spring-data-neo4j/data/**
|
|
@ -108,7 +108,7 @@
|
|||
<dependency>
|
||||
<groupId>org.neo4j.test</groupId>
|
||||
<artifactId>neo4j-harness</artifactId>
|
||||
<version>5.5.0</version>
|
||||
<version>${neo4j.version}</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -129,6 +129,8 @@
|
|||
<neo4j-ogm.version>4.0.4</neo4j-ogm.version>
|
||||
<neo4j-jdbc.version>4.0.9</neo4j-jdbc.version>
|
||||
<neo4j-ogm-embedded-driver.version>3.2.39</neo4j-ogm-embedded-driver.version>
|
||||
<org.slf4j.version>2.0.7</org.slf4j.version>
|
||||
<logback.version>1.4.7</logback.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -13,6 +13,7 @@ import com.baeldung.spring.data.neo4j.repository.PersonRepository;
|
|||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.neo4j.harness.Neo4j;
|
||||
import org.neo4j.harness.Neo4jBuilders;
|
||||
|
@ -32,10 +33,10 @@ import java.util.*;
|
|||
class MovieRepositoryIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private static MovieRepository movieRepository;
|
||||
private MovieRepository movieRepository;
|
||||
|
||||
@Autowired
|
||||
private static PersonRepository personRepository;
|
||||
private PersonRepository personRepository;
|
||||
|
||||
public MovieRepositoryIntegrationTest() {
|
||||
}
|
||||
|
@ -43,11 +44,14 @@ class MovieRepositoryIntegrationTest {
|
|||
private static Neo4j embeddedDatabaseServer;
|
||||
|
||||
@BeforeAll
|
||||
static void initializeNeo4j() {
|
||||
|
||||
static void setup() {
|
||||
embeddedDatabaseServer = Neo4jBuilders.newInProcessBuilder()
|
||||
.withDisabledServer()
|
||||
.build();
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void initializeNeo4j() {
|
||||
|
||||
System.out.println("seeding embedded database");
|
||||
Movie italianJob = new Movie();
|
||||
|
|
Loading…
Reference in New Issue