コード例 #1
0
ファイル: SettingTests.cs プロジェクト: kostyll/HudlFfmpeg
        public void FrameRate_Verify()
        {
            var settingWrong1 = new FrameRate();
            var setting = new FrameRate(29.97);

            Assert.Throws<InvalidOperationException>(() => { SettingSerializer.Serialize(settingWrong1); });
            Assert.DoesNotThrow(() => SettingSerializer.Serialize(setting));
            Assert.Equal(SettingSerializer.Serialize(setting), "-r 29.97");
        }
コード例 #2
0
        public void FrameRate_Verify()
        {
            var settingWrong1 = new FrameRate();
            var setting = new FrameRate(29.97);

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