Exemple #1
0
        public void BitRateTolerance_Verify()
        {
            var settingWrong1 = new BitRateTolerance(0);
            var setting = new BitRateTolerance(1100);

            Assert.Throws<InvalidOperationException>(() => { SettingSerializer.Serialize(settingWrong1); });
            Assert.DoesNotThrow(() => SettingSerializer.Serialize(setting));
            Assert.Equal(SettingSerializer.Serialize(setting), "-bt 1100k");
        }
        public void BitRateTolerance_Verify()
        {
            var settingWrong1 = new BitRateTolerance(0);
            var setting = new BitRateTolerance(1100);

            Assert.Throws<InvalidOperationException>(() => { var s = settingWrong1.GetAndValidateString(); });
            Assert.DoesNotThrow(() => { var s = setting.GetAndValidateString(); });
            Assert.Equal(setting.GetAndValidateString(), "-bt 1100k");
        }