public override void Run(StoreAccess store, PrintStream @out) { long propId = FirstPropId(store); RecordStore <PropertyRecord> propertyStore = store.PropertyStore; PropertyRecord record = propertyStore.NewRecord(); while (propId != Record.NO_NEXT_PROPERTY.intValue()) { propertyStore.GetRecord(propId, record, NORMAL); // We rely on this method having the side-effect of loading the property blocks: record.NumberOfProperties(); @out.println(record); propId = record.NextProp; } }
private void AssertRecord(PropertyRecord record, ExpectedRecord expectedRecord) { assertEquals(expectedRecord.Properties.Length, record.NumberOfProperties()); foreach (ExpectedProperty expectedProperty in expectedRecord.Properties) { PropertyBlock block = record.GetPropertyBlock(expectedProperty.Key); assertNotNull(block); assertEquals(expectedProperty.Value, block.Type.value(block, _propertyStore)); if (expectedProperty.AssertHasDynamicRecords != null) { if (expectedProperty.AssertHasDynamicRecords.Value) { assertThat(block.ValueRecords.Count, Matchers.greaterThan(0)); } else { assertEquals(0, block.ValueRecords.Count); } } } }