public void BinaryDataListRow_ProtoBuffSerialize_NormalSerialization_AllDataConverted() { //------------Setup for test-------------------------- BinaryDataListRow row1 = new BinaryDataListRow(5); row1.UpdateValue("col1", 0, 5); row1.UpdateValue("col2", 1, 5); row1.UpdateValue("col3", 2, 5); row1.UpdateValue("col4", 3, 5); row1.UpdateValue("col5", 4, 5); //------------Execute Test--------------------------- var bytes = row1.ToByteArray(); //------------Assert Results------------------------- Assert.AreEqual(92, bytes.Length); }
public void BinaryDataListRow_ProtoBuffDeserialize_NormalDeserialization_AllDataHydrated() { //------------Setup for test-------------------------- BinaryDataListRow row1 = new BinaryDataListRow(5); row1.UpdateValue("col1", 0, 5); row1.UpdateValue("col2", 1, 5); row1.UpdateValue("col3", 2, 5); row1.UpdateValue("col4", 3, 5); row1.UpdateValue("col5", 4, 5); //------------Execute Test--------------------------- var bytes = row1.ToByteArray(); BinaryDataListRow row2 = new BinaryDataListRow(5); row2.ToObject(bytes); //------------Assert Results------------------------- Assert.AreEqual("col1", row2.FetchValue(0, 5)); }