public void FromInt32_Value_PayloadHasValue() { int value = -123456789; var message = HarpCommand.WriteInt32(DefaultAddress, value); AssertIsValid(message); Assert.AreEqual(value, message.GetPayloadInt32()); }
public void FromInt32_Array_PayloadHasValue() { var value = new int[] { int.MaxValue / 2, -123456789 }; var message = HarpCommand.WriteInt32(DefaultAddress, value); AssertIsValid(message); var payload = message.GetPayloadArray <int>(); AssertArrayEqual(value, payload); Assert.AreEqual(value[1], message.GetPayloadInt32(1)); }