Package | Description |
---|---|
org.assertj.neo4j.api |
Modifier and Type | Method and Description |
---|---|
static NodeAssert |
Assertions.assertThat(org.neo4j.graphdb.Node node) |
NodeAssert |
NodeAssert.doesNotHaveLabel(org.neo4j.graphdb.Label label)
Verifies that the actual
Node does NOT have the given labelExample: GraphDatabaseService graph = new TestGraphDatabaseFactory().newImpermanentDatabase(); Node node = graph.createNode(); node.addLabel(DynamicLabel.label("DOUGHNUT_LOVER")); assertThat(node).doesNotHaveLabel(DynamicLabel.label("FRUIT_LOVER")); If the label is null , an IllegalArgumentException is thrown. |
NodeAssert |
NodeAssert.doesNotHaveLabel(String labelValue)
Verifies that the actual
Node does NOT have the given label nameExample: GraphDatabaseService graph = new TestGraphDatabaseFactory().newImpermanentDatabase(); Node node = graph.createNode(); node.addLabel(DynamicLabel.label("DOUGHNUT_LOVER")); assertThat(node).doesNotHaveLabel("FRUIT_LOVER"); If the labelValue is null , an IllegalArgumentException is thrown. |
NodeAssert |
NodeAssert.hasLabel(org.neo4j.graphdb.Label label)
Verifies that the actual
Node has the given labelExample: GraphDatabaseService graph = new TestGraphDatabaseFactory().newImpermanentDatabase(); Node node = graph.createNode(); Label doughnutLover = DynamicLabel.label("DOUGHNUT_LOVER"); node.addLabel(doughnutLover); assertThat(node).hasLabel(doughnutLover); If the label is null , an IllegalArgumentException is thrown. |
NodeAssert |
NodeAssert.hasLabel(String labelValue)
Verifies that the actual
Node has the given label nameExample: GraphDatabaseService graph = new TestGraphDatabaseFactory().newImpermanentDatabase(); Node node = graph.createNode(); node.addLabel(DynamicLabel.label("DOUGHNUT_LOVER")); assertThat(node).hasLabel("DOUGHNUT_LOVER"); If the labelValue is null , an IllegalArgumentException is thrown. |
Copyright © 2017 AssertJ. All rights reserved.