Esempio n. 1
0
        private static void NumericPreAssert(INumber target, INumber actual, string methodName)
        {
            if (!target.HasValue())
            {
                Assert.HandleFail(methodName, "The target value cannot be null or undefined.", null);
            }

            if (!actual.HasValue())
            {
                Assert.HandleFail(methodName, "The actual value cannot be null or undefined.", null);
            }

            if (window.isNaN(target))
            {
                Assert.HandleFail(methodName, "The target value must be a valid number.", null);
            }

            if (window.isNaN(actual))
            {
                Assert.HandleFail(methodName, "The actual value must be a valid number.", null);
            }
        }