private static void CheckInt64(long expectedValue, int expectedSize) { IFieldWriter writer = new FieldWriter(); writer.Write(expectedValue); IFieldReader reader = new FieldReader(writer.ToArray()); long actualValue = reader.ReadInt64(); Assert.AreEqual(expectedValue, actualValue, "Expected deserialized value "); if (expectedSize > 0) { Assert.AreEqual(expectedSize, writer.Position, "Unexpected size for {0} ", expectedValue); } }