Beispiel #1
0
 public void TestOutOfRangeParameter()
 {
     Model.Tools.Common.IImageTool bright = new Model.Tools.BrightNess();
     bright.AddParameter(Model.Tools.Common.ParameterName.Brightness, new Model.Tools.Common.Parameter <Double>(256));
     try
     {
         bright.ApplyTool(target);
         Assert.Fail("Should be between -255 and 255");
     }
     catch (Exception)
     {
         Assert.IsTrue(true);
     }
 }
Beispiel #2
0
 public void TestDoubleParameter()
 {
     Model.Tools.Common.IImageTool bright = new Model.Tools.BrightNess();
     bright.AddParameter(Model.Tools.Common.ParameterName.Brightness, new Model.Tools.Common.Parameter <Double>(150.5));
     try
     {
         bright.ApplyTool(target);
         Assert.Fail("Should be an int");
     }
     catch (Exception)
     {
         Assert.IsTrue(true);
     }
 }