public void LimitPacketSize_Long_RangeValidated(long value, bool isValid) { var builder = new MqttClientConfigBuilder(); Action act = () => builder.LimitPacketSize(value); if (isValid) { act.Should().NotThrow(); } else { act.Should().Throw <ArgumentOutOfRangeException>(); } }