示例#1
0
        public static ICheckLink <ICheck <long> > IsGreaterThan(this ICheck <long> check, long comparand)
        {
            var numberCheckStrategy = new NumberCheck <long>(check);

            return(numberCheckStrategy.IsGreaterThan(comparand));
        }
        /// <summary>
        /// Checks that the checked value is strictly less than the comparand.
        /// </summary>
        /// <param name="check">
        /// The fluent check to be extended.
        /// </param>
        /// <param name="comparand">
        /// Comparand to compare the value to.
        /// </param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">
        /// The value is not strictly less than the comparand.
        /// </exception>
        public static ICheckLink <ICheck <ulong> > IsStrictlyLessThan(this ICheck <ulong> check, ulong comparand)
        {
            var numberCheckStrategy = new NumberCheck <ulong>(check);

            return(numberCheckStrategy.IsStrictlyLessThan(comparand));
        }
示例#3
0
        /// <summary>
        /// Checks that the actual value is NOT equal to zero.
        /// </summary>
        /// <param name="check">The fluent check to be extended.</param>
        /// <returns>
        ///   <returns>A check link.</returns>
        /// </returns>
        /// <exception cref="FluentCheckException">The value is equal to zero.</exception>
        public static ICheckLink <ICheck <long> > IsNotZero(this ICheck <long> check)
        {
            var numberCheckStrategy = new NumberCheck <long>(check);

            return(numberCheckStrategy.IsNotZero());
        }
示例#4
0
        /// <summary>
        /// Checks that the checked value is strictly greater than the comparand.
        /// </summary>
        /// <param name="check">
        /// The fluent check to be extended.
        /// </param>
        /// <param name="comparand">
        /// Comparand to compare the value to.
        /// </param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">
        /// The checked value is not strictly greater than the comparand.
        /// </exception>
        public static ICheckLink <ICheck <uint> > IsStrictlyGreaterThan(this ICheck <uint> check, uint comparand)
        {
            var numberCheckStrategy = new NumberCheck <uint>(check);

            return(numberCheckStrategy.IsStrictlyGreaterThan(comparand));
        }
示例#5
0
        /// <summary>
        /// Checks that the actual value is equal to zero.
        /// </summary>
        /// <param name="check">The fluent check to be extended.</param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">The value is not equal to zero.</exception>
        public static ICheckLink <ICheck <uint> > IsZero(this ICheck <uint> check)
        {
            var numberCheckStrategy = new NumberCheck <uint>(check);

            return(numberCheckStrategy.IsZero());
        }
        /// <summary>
        /// Checks that the actual value is positive or equal to zero.
        /// </summary>
        /// <param name="check">The fluent check to be extended.</param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">The value is not positive or equal to zero.</exception>
        public static ICheckLink <ICheck <short> > IsPositiveOrZero(this ICheck <short> check)
        {
            var numberCheckStrategy = new NumberCheck <short>(check);

            return(numberCheckStrategy.IsPositiveOrZero());
        }
        public static ICheckLink <ICheck <short> > IsNegative(this ICheck <short> check)
        {
            var numberCheckStrategy = new NumberCheck <short>(check);

            return(numberCheckStrategy.IsStrictlyNegative());
        }
示例#8
0
        /// <summary>
        /// Checks that the actual value is less than an operand.
        /// </summary>
        /// <param name="check">
        /// The fluent check to be extended.
        /// </param>
        /// <param name="comparand">
        /// Comparand to compare the value to.
        /// </param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">
        /// The value is not less than the comparand.
        /// </exception>
        public static ICheckLink <ICheck <byte> > IsLessThan(this ICheck <byte> check, byte comparand)
        {
            var numberCheckStrategy = new NumberCheck <byte>(check);

            return(numberCheckStrategy.IsLessThan(comparand));
        }
示例#9
0
        /// <summary>
        /// Checks that the actual value is strictly positive.
        /// </summary>
        /// <param name="check">The fluent check to be extended.</param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">The value is not strictly positive.</exception>
        public static ICheckLink <ICheck <double> > IsStrictlyPositive(this ICheck <double> check)
        {
            var numberCheckStrategy = new NumberCheck <double>(check);

            return(numberCheckStrategy.IsStrictlyPositive());
        }
示例#10
0
        /// <summary>
        /// Checks that the actual value is negative or equal to zero.
        /// </summary>
        /// <param name="check">The fluent check to be extended.</param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">The value is not negative or equal to zero.</exception>
        public static ICheckLink <ICheck <double> > IsNegativeOrZero(this ICheck <double> check)
        {
            var numberCheckStrategy = new NumberCheck <double>(check);

            return(numberCheckStrategy.IsNegativeOrZero());
        }
示例#11
0
        /// <summary>
        /// Checks that the actual value is less than an operand.
        /// </summary>
        /// <param name="check">
        /// The fluent check to be extended.
        /// </param>
        /// <param name="comparand">
        /// Comparand to compare the value to.
        /// </param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">
        /// The value is not less than the comparand.
        /// </exception>
        public static ICheckLink <ICheck <ushort> > IsLessThan(this ICheck <ushort> check, ushort comparand)
        {
            var numberCheckStrategy = new NumberCheck <ushort>(check);

            return(numberCheckStrategy.IsLessThan(comparand));
        }
示例#12
0
        public static ICheckLink <ICheck <decimal> > IsGreaterThan(this ICheck <decimal> check, decimal comparand)
        {
            var numberCheckStrategy = new NumberCheck <decimal>(check);

            return(numberCheckStrategy.IsGreaterThan(comparand));
        }