public void ConvertFromStringsTest()
        {
            DoubleToBooleanConverter converter = new DoubleToBooleanConverter();

            converter.Comparison = ComparisonOperator.Equal;
            object result = converter.Convert("1.00000000000000000000000001", typeof(bool), "1.0", CultureInfo.InvariantCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);
            result = converter.Convert("1.000001", typeof(bool), "1.0", CultureInfo.InvariantCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(false, (bool)result);
        }
        public void ConvertTest()
        {
            DoubleToBooleanConverter converter = new DoubleToBooleanConverter();

            converter.Comparison = ComparisonOperator.Equal;
            object result = converter.Convert(1.00000000000000000000000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);
            result = converter.Convert(1.000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(false, (bool)result);

            converter.Comparison = ComparisonOperator.NotEqual;
            result = converter.Convert(1.00000000000000000000000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(false, (bool)result);
            result = converter.Convert(1.000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);

            converter.Comparison = ComparisonOperator.Greater;
            result = converter.Convert(1.00000000000000000000000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(false, (bool)result);
            result = converter.Convert(1.000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);

            converter.Comparison = ComparisonOperator.GreaterOrEqual;
            result = converter.Convert(1.00000000000000000000000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);
            result = converter.Convert(1.000001, typeof(bool), 1.0, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);

            converter.Comparison = ComparisonOperator.Less;
            result = converter.Convert(1.0, typeof(bool), 1.00000000000000000000000001, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(false, (bool)result);
            result = converter.Convert(1.0, typeof(bool), 1.000001, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);

            converter.Comparison = ComparisonOperator.LessOrEqual;
            result = converter.Convert(1.0, typeof(bool), 1.00000000000000000000000001, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);
            result = converter.Convert(1.0, typeof(bool), 1.000001, CultureInfo.CurrentCulture);
            Assert.IsTrue(result is bool);
            Assert.AreEqual(true, (bool)result);
        }