public async Task ReadConnParamsAsync() { platform.customResponses.Add(new byte[] { 0x11, 0x89 }, new byte[] { 0x11, 0x89, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00, 0x58, 0x02 }); var expected = new BleConnectionParameters(7.5f, 11.25f, 0, 6000); Assert.That(await settings.ReadBleConnParamsAsync(), Is.EqualTo(expected)); }
public override bool Equals(Object o) { if (this == o) { return(true); } if (o == null || GetType() != o.GetType()) { return(false); } BleConnectionParameters that = (BleConnectionParameters)o; return(MinConnectionInterval.Equals(that.MinConnectionInterval) && MaxConnectionInterval.Equals(that.MaxConnectionInterval) && SlaveLatency == that.SlaveLatency && SupervisorTimeout == that.SupervisorTimeout); }