Ejemplo n.º 1
0
 private void ExistingRecord(PropertyRecord record, ExpectedRecord initialRecord)
 {
     foreach (ExpectedProperty initialProperty in initialRecord.Properties)
     {
         PropertyBlock block = new PropertyBlock();
         _propertyStore.encodeValue(block, initialProperty.Key, initialProperty.Value);
         record.AddPropertyBlock(block);
     }
     assertTrue(record.Size() <= PropertyType.PayloadSize);
 }
Ejemplo n.º 2
0
 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);
             }
         }
     }
 }