static void TestDBRecord() { // init record List <AtomValue> values = new List <AtomValue>(); AtomValue value1 = new AtomValue() { Type = AttributeTypes.Int, IntegerValue = 222 }; AtomValue value2 = new AtomValue() { Type = AttributeTypes.Null }; AtomValue value3 = new AtomValue() { Type = AttributeTypes.Char, CharLimit = 5, StringValue = "222" }; values.Add(value1); values.Add(value2); values.Add(value3); DBRecord record = new DBRecord(values); // make raw bytes List <byte> rawNode = new List <byte>(); rawNode.AddRange(new byte[30]); // clone List <AtomValue> valuesOut1 = record.GetValues(); // clone byte[] raw = record.Pack(); rawNode.AddRange(raw); record.Unpack(rawNode.ToArray(), 30); List <AtomValue> valuesOut2 = record.GetValues(); int i; for (i = 0; i < valuesOut2.Count; i++) { AssertAtomValue(values[i], valuesOut2[i]); AssertAtomValue(valuesOut1[i], valuesOut2[i]); } }