示例#1
0
        internal static ICheckLink <TU> PerformEqualCheck <T, TU, TE>(
            IChecker <T, TU> checker,
            TE expected,
            bool useOperator = false,
            bool negated     = false)
            where TU : class, IMustImplementIForkableCheckWithoutDisplayingItsMethodsWithinIntelliSense
        {
            var mode = Check.EqualMode;

            var shouldFail = negated;

            return(checker.ExecuteCheck(() =>
            {
                if (shouldFail == FluentEquals(checker.Value, expected, mode))
                {
                    throw new FluentCheckException(BuildErrorMessage(checker, expected, negated, useOperator));
                }
            },
                                        BuildErrorMessage(checker, expected, !negated, useOperator)));
        }