Exemple #1
0
        /// -------------------------------------------------------------------------
        /// <summary></summary>
        /// -------------------------------------------------------------------------
        void TS_VerifyValue(object ExpectedValue, bool ShouldBeEqual, CheckType checkType)
        {
            Comment("Current value == " + pattern_Value.ToString(CultureInfo.CurrentCulture));

            double CurrentValue   = pattern_Value;
            double dExpectedValue = Convert.ToDouble(ExpectedValue, CultureInfo.CurrentCulture);

            if (ShouldBeEqual)
            {   // equal
                if (GenericMath.CompareTo(CurrentValue, dExpectedValue) != 0)
                {
                    ThrowMe(checkType, "Value() returned " + CurrentValue + " but was expecting " + ExpectedValue);
                }
            }
            else
            {   // not equal
                if (GenericMath.CompareTo(CurrentValue, dExpectedValue) == 0)
                {
                    ThrowMe(checkType, "Value() returned " + CurrentValue + " but was expecting " + ExpectedValue);
                }
            }

            m_TestStep++;
        }