Description
Neo4j is a highly scalable open source graph database management system.Examples
Dependency:
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>neo4j</artifactId>
<version>1.20.0</version>
<scope>test</scope>
</dependency>
Usage:
var neo4j = new Neo4jContainer<>(DockerImageName.parse("neo4j:4.4"));
neo4j.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/neo4j
Usage:
neo4jContainer, err := neo4j.Run(ctx,
"neo4j:4.4",
neo4j.WithAdminPassword("letmein!"),
neo4j.WithLabsPlugin(neo4j.Apoc),
)
Dependency:
dotnet add package Testcontainers.Neo4j --version 3.9.0
Usage:
var neo4jContainer = new Neo4jBuilder()
.WithImage("neo4j:5.4")
.Build();
await neo4jContainer.StartAsync();
Dependency:
npm install @testcontainers/neo4j --save-dev
Usage:
const container = await new Neo4jContainer().start();
Dependency:
pip install testcontainers[neo4j]
Usage:
with Neo4jContainer() as neo4j, neo4j.get_driver() as driver, driver.session() as session:
result = session.run("MATCH (n) RETURN n LIMIT 1")
record = result.single()