public void FromSingle_Value_PayloadHasValue() { float value = (float)Math.E; var message = HarpCommand.WriteSingle(DefaultAddress, value); AssertIsValid(message); Assert.AreEqual(value, message.GetPayloadSingle()); }
public void FromSingle_Array_PayloadHasValue() { var value = new float[] { (float)Math.PI, 1 / 3f }; var message = HarpCommand.WriteSingle(DefaultAddress, value); AssertIsValid(message); var payload = message.GetPayloadArray <float>(); AssertArrayEqual(value, payload); Assert.AreEqual(value[1], message.GetPayloadSingle(1)); }