public void TestInvalidParameter() { var saturation = Saturation.CreateSaturation(); try { saturation.AddParameter(Model.Tools.Common.ParameterName.Hue, new Model.Tools.Common.Parameter <Double>(150)); Assert.Fail("The Parameter Name is not valid"); } catch (Exception) { Assert.IsTrue(true); } }
public void TestOutOfRangeParameter() { var saturation = Saturation.CreateSaturation(); saturation.AddParameter(Model.Tools.Common.ParameterName.Saturation, new Model.Tools.Common.Parameter <double>(2)); try { saturation.ApplyTool(_target); Assert.Fail("Should be between -1 and 1"); } catch (Exception) { Assert.IsTrue(true); } }
public void TestRepeatedParameter() { var saturation = Saturation.CreateSaturation(); saturation.AddParameter(Model.Tools.Common.ParameterName.Saturation, new Model.Tools.Common.Parameter <Double>(1)); try { saturation.AddParameter(Model.Tools.Common.ParameterName.Saturation, new Model.Tools.Common.Parameter <Double>(150)); Assert.Fail("You need to remove the parameter first"); } catch (Exception) { Assert.IsTrue(true); } }