public void equality_with_equals_true_when_same() { var meterValue = new MeterValue(1, 2, 3, 4, 5, TimeUnit.Seconds); var value = new MeterValue.SetItem("item", 0.5, meterValue); var other = new MeterValue.SetItem("item", 0.5, meterValue); value.Equals(other).Should().Be(true); }
public void equality_with_equals_false_when_not_same_by_percent() { var meterValue = new MeterValue(1, 2, 3, 4, 5, TimeUnit.Seconds); var value = new MeterValue.SetItem("item", 0.5, meterValue); var other = new MeterValue.SetItem("item", 0.6, meterValue); value.Equals(other).Should().Be(false); }