public void BaseTest(byte[] actualBytes, VariablePoint expected, FileVersion version, CustomUnits customUnits = null) { var actual = new VariablePoint(actualBytes, 0, version); actual.Value.CustomUnits = customUnits; BytesAssert.AreEqual(actual.ToBytes(), expected.ToBytes()); BytesAssert.AreEqual(actualBytes, expected.ToBytes()); ObjectAssert.AreEqual(actual, expected); }
public static void AreEqual(IBinaryObject expected, IBinaryObject actual, string message = "") { //Compare object properties AreEqual((object)expected, actual, message); BytesAssert.AreEqual(expected.ToBytes(), actual.ToBytes(), $@"{nameof(ObjectAssert)}.{nameof(AreEqual)} ToBytes test failed. {message}"); }