Ejemplo n.º 1
0
        public static void DROValue(string HardcodedInParam, string ActualInParam)
        {
            string ActualValue    = ActualInParam;
            string HardcodedValue = HardcodedInParam;

            bool bVerySimilarValues = false;

            double dActualValue;
            double dHardcodedValue;

            Double.TryParse(ActualValue, out dActualValue);
            Double.TryParse(HardcodedValue, out dHardcodedValue);

            try
            {
                bVerySimilarValues = Mathematics.PreparingForCalculation(dActualValue, dHardcodedValue, 0.070);

                if (!bVerySimilarValues)
                {
                    ReportAction.RunNegativeReport(dActualValue, dHardcodedValue);
                }
            }
            catch (Exception)
            {
            }

            if (bVerySimilarValues)
            {
                ReportAction.RunPositiveReport(dActualValue);
            }
        }
Ejemplo n.º 2
0
        public static void DROValueInch(string Hardcoded, string Actual)
        {
            string ActualValueInch    = Actual;
            string HardcodedVAlueInch = Hardcoded;

            bool ExpectedDeviation = true;

            double dActualValue;
            double dHardcodedValue;

            Double.TryParse(ActualValueInch, out dActualValue);
            Double.TryParse(HardcodedVAlueInch, out dHardcodedValue);

            try
            {
                if (!Mathematics.PreparingForCalculation(dActualValue, dHardcodedValue, 0.003))
                {
                    ExpectedDeviation = false;

                    ReportAction.RunNegativeReport(dActualValue, dHardcodedValue);
                }
            }
            catch (Exception)
            {
            }

            if (ExpectedDeviation)
            {
                ReportAction.RunPositiveReport(dActualValue);
            }
        }