use of org.neo4j.kernel.impl.store.record.PropertyBlock in project neo4j by neo4j.
the class PropertyRecordCheckTest method shouldReportArrayRecordNotInUse.
@Test
public void shouldReportArrayRecordNotInUse() throws Exception {
// given
PropertyRecord property = inUse(new PropertyRecord(42));
PropertyKeyTokenRecord key = add(inUse(new PropertyKeyTokenRecord(6)));
DynamicRecord value = add(notInUse(array(new DynamicRecord(1001))));
PropertyBlock block = propertyBlock(key, value);
property.addPropertyBlock(block);
// when
ConsistencyReport.PropertyConsistencyReport report = check(property);
// then
verify(report).arrayNotInUse(block, value);
verifyNoMoreInteractions(report);
}
use of org.neo4j.kernel.impl.store.record.PropertyBlock in project neo4j by neo4j.
the class PropertyRecordCheckTest method shouldReportEmptyArrayRecord.
@Test
public void shouldReportEmptyArrayRecord() throws Exception {
// given
PropertyRecord property = inUse(new PropertyRecord(42));
PropertyKeyTokenRecord key = add(inUse(new PropertyKeyTokenRecord(6)));
DynamicRecord value = add(inUse(array(new DynamicRecord(1001))));
PropertyBlock block = propertyBlock(key, value);
property.addPropertyBlock(block);
// when
ConsistencyReport.PropertyConsistencyReport report = check(property);
// then
verify(report).arrayEmpty(block, value);
verifyNoMoreInteractions(report);
}
use of org.neo4j.kernel.impl.store.record.PropertyBlock in project neo4j by neo4j.
the class PropertyRecordCheckTest method shouldReportEmptyStringRecord.
@Test
public void shouldReportEmptyStringRecord() throws Exception {
// given
PropertyRecord property = inUse(new PropertyRecord(42));
PropertyKeyTokenRecord key = add(inUse(new PropertyKeyTokenRecord(6)));
DynamicRecord value = add(inUse(string(new DynamicRecord(1001))));
PropertyBlock block = propertyBlock(key, value);
property.addPropertyBlock(block);
// when
ConsistencyReport.PropertyConsistencyReport report = check(property);
// then
verify(report).stringEmpty(block, value);
verifyNoMoreInteractions(report);
}
use of org.neo4j.kernel.impl.store.record.PropertyBlock in project neo4j by neo4j.
the class PropertyRecordCheckTest method shouldReportStringRecordNotInUse.
@Test
public void shouldReportStringRecordNotInUse() throws Exception {
// given
PropertyRecord property = inUse(new PropertyRecord(42));
PropertyKeyTokenRecord key = add(inUse(new PropertyKeyTokenRecord(6)));
DynamicRecord value = add(notInUse(string(new DynamicRecord(1001))));
PropertyBlock block = propertyBlock(key, value);
property.addPropertyBlock(block);
// when
ConsistencyReport.PropertyConsistencyReport report = check(property);
// then
verify(report).stringNotInUse(block, value);
verifyNoMoreInteractions(report);
}
use of org.neo4j.kernel.impl.store.record.PropertyBlock in project neo4j by neo4j.
the class RecordCheckTestBase method propertyBlock.
public static PropertyBlock propertyBlock(PropertyKeyTokenRecord key, PropertyType type, long value) {
PropertyBlock block = new PropertyBlock();
block.setSingleBlock(key.getId() | (((long) type.intValue()) << 24) | (value << 28));
return block;
}
Aggregations