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