예제 #1
0
        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);
        }
예제 #2
0
        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}");
        }