public void AspectRatio_Verify() { var settingWrong1 = new AspectRatio(); var setting = new AspectRatio(FFmpegRatio.Create(1, 1)); Assert.Throws <InvalidOperationException>(() => { var s = settingWrong1.GetAndValidateString(); }); Assert.DoesNotThrow(() => { var s = setting.GetAndValidateString(); }); Assert.Equal(setting.GetAndValidateString(), "-aspect 1:1"); }
public SetSar(FFmpegRatio ratio) : this() { if (ratio == null) { throw new ArgumentException("Ratio cannot be null.", "ratio"); } Ratio = ratio; }
public AspectRatio(FFmpegRatio ratio) : this() { if (ratio == null) { throw new ArgumentNullException("ratio"); } Ratio = ratio; }