Beispiel #1
0
        public void FromInt16_Value_PayloadHasValue()
        {
            short value   = 1024;
            var   message = HarpCommand.WriteInt16(DefaultAddress, value);

            AssertIsValid(message);
            Assert.AreEqual(value, message.GetPayloadInt16());
        }
Beispiel #2
0
        public void FromInt16_Array_PayloadHasValue()
        {
            var value   = new short[] { 512, -2048 };
            var message = HarpCommand.WriteInt16(DefaultAddress, value);

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

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