Exemple #1
0
        public void FromSByte_Value_PayloadHasValue()
        {
            sbyte value   = -3;
            var   message = HarpCommand.WriteSByte(DefaultAddress, value);

            AssertIsValid(message);
            Assert.AreEqual(value, message.GetPayloadSByte());
        }
Exemple #2
0
        public void FromSByte_Array_PayloadHasValue()
        {
            var value   = new sbyte[] { 4, -23 };
            var message = HarpCommand.WriteSByte(DefaultAddress, value);

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

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