Exemplo n.º 1
0
        public void TestInvalidParameter()
        {
            var vibrance = Vibrance.CreateVibrance();

            try
            {
                vibrance.AddParameter(Model.Tools.Common.ParameterName.Saturation, new Model.Tools.Common.Parameter <Double>(150));
                Assert.Fail("The Parameter Name is not valid");
            }
            catch (Exception)
            {
                Assert.IsTrue(true);
            }
        }
Exemplo n.º 2
0
        public void TestOutOfRangeParameter()
        {
            var vibrance = Vibrance.CreateVibrance();

            vibrance.AddParameter(Model.Tools.Common.ParameterName.Vibrance, new Model.Tools.Common.Parameter <double>(2));
            try
            {
                vibrance.ApplyTool(_target);
                Assert.Fail("Should be between -1 and 1");
            }
            catch (Exception)
            {
                Assert.IsTrue(true);
            }
        }
Exemplo n.º 3
0
        public void TestRepeatedParameter()
        {
            var vibrance = Vibrance.CreateVibrance();

            vibrance.AddParameter(Model.Tools.Common.ParameterName.Vibrance, new Model.Tools.Common.Parameter <Double>(1));
            try
            {
                vibrance.AddParameter(Model.Tools.Common.ParameterName.Vibrance, new Model.Tools.Common.Parameter <Double>(150));
                Assert.Fail("You need to remove the parameter first");
            }
            catch (Exception)
            {
                Assert.IsTrue(true);
            }
        }