Example #1
0
        public void FromInt64_Value_PayloadHasValue()
        {
            long value   = -int.MaxValue * 2u;
            var  message = HarpCommand.WriteInt64(DefaultAddress, value);

            AssertIsValid(message);
            Assert.AreEqual(value, message.GetPayloadInt64());
        }
Example #2
0
        public void FromInt64_Array_PayloadHasValue()
        {
            var value   = new long[] { int.MaxValue * -2u, 123456789 };
            var message = HarpCommand.WriteInt64(DefaultAddress, value);

            AssertIsValid(message);
            var payload = message.GetPayloadArray <long>();

            AssertArrayEqual(value, payload);
            Assert.AreEqual(value[1], message.GetPayloadInt64(1));
        }