use of org.neo4j.kernel.api.exceptions.schema.MalformedSchemaRuleException in project neo4j by neo4j.
the class SchemaRecordCheckTest method shouldReportMalformedSchemaRule.
@Test
public void shouldReportMalformedSchemaRule() throws Exception {
// given
DynamicRecord badRecord = inUse(new DynamicRecord(0));
badRecord.setType(RecordAccessStub.SCHEMA_RECORD_TYPE);
when(checker().ruleAccess.loadSingleSchemaRule(0)).thenThrow(new MalformedSchemaRuleException("Bad Record"));
// when
ConsistencyReport.SchemaConsistencyReport report = check(badRecord);
// then
verify(report).malformedSchemaRule();
}
Aggregations