Пример #1
0
        public static ICheckLink <ICheck <long> > IsGreaterThan(this ICheck <long> check, long comparand)
        {
            var numberCheckStrategy = new NumberCheck <long>(check);

            return(numberCheckStrategy.IsGreaterThan(comparand));
        }
Пример #2
0
        /// <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));
        }