use of org.neo4j.kernel.impl.store.record.ConstraintRule in project neo4j by neo4j.
the class SchemaStorageTest method shouldReturnCorrectUniquenessRuleForLabelAndProperty.
@Test
public void shouldReturnCorrectUniquenessRuleForLabelAndProperty() throws SchemaRuleNotFoundException, DuplicateSchemaRuleException {
// Given
createSchema(uniquenessConstraint(LABEL1, PROP1), uniquenessConstraint(LABEL2, PROP1));
// When
ConstraintRule rule = storage.constraintsGetSingle(ConstraintDescriptorFactory.uniqueForLabel(labelId(LABEL1), propId(PROP1)));
// Then
assertNotNull(rule);
assertRule(rule, LABEL1, PROP1, ConstraintDescriptor.Type.UNIQUE);
}
Aggregations