mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
commit
d32180610d
@ -18,10 +18,7 @@ package org.springframework.boot.test.autoconfigure.data.neo4j;
|
|||||||
|
|
||||||
import org.junit.ClassRule;
|
import org.junit.ClassRule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.rules.TestRule;
|
|
||||||
import org.junit.runner.Description;
|
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.model.Statement;
|
|
||||||
import org.neo4j.ogm.session.Session;
|
import org.neo4j.ogm.session.Session;
|
||||||
import org.testcontainers.containers.Neo4jContainer;
|
import org.testcontainers.containers.Neo4jContainer;
|
||||||
|
|
||||||
@ -50,19 +47,10 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
|||||||
@DataNeo4jTest
|
@DataNeo4jTest
|
||||||
public class DataNeo4jTestIntegrationTests {
|
public class DataNeo4jTestIntegrationTests {
|
||||||
|
|
||||||
|
@ClassRule
|
||||||
public static SkippableContainer<Neo4jContainer<?>> neo4j = new SkippableContainer<Neo4jContainer<?>>(
|
public static SkippableContainer<Neo4jContainer<?>> neo4j = new SkippableContainer<Neo4jContainer<?>>(
|
||||||
() -> new Neo4jContainer<>().withAdminPassword(null));
|
() -> new Neo4jContainer<>().withAdminPassword(null));
|
||||||
|
|
||||||
@ClassRule
|
|
||||||
public static TestRule skippableContainer = new TestRule() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Statement apply(Statement base, Description description) {
|
|
||||||
return neo4j.apply(base, description);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private Session session;
|
private Session session;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user