コード例 #1
0
        public static IFilterToken IsTrue <T1, T2>(this IForToken <T1, T2> ifor,
                                                   Expression <Func <T1, T2, bool> > filter,
                                                   [CallerFilePath] string file     = "",
                                                   [CallerLineNumber] int line      = 0,
                                                   [CallerMemberName] string member = "")
        {
            var diag = DiagInfoExpressionFactory.CreateDiag(file, line, member, filter);

            return(ifor.IsTrue(diag, filter.Compile()));
        }
コード例 #2
0
        public static IHaveToken <T2> IsNot <T1, T2>(this IForToken <T1> ifor,
                                                     Expression <Func <T1, T2> > srcFunc,
                                                     [CallerFilePath] string file     = "",
                                                     [CallerLineNumber] int line      = 0,
                                                     [CallerMemberName] string member = "")
        {
            var diag = DiagInfoExpressionFactory.CreateDiag(file, line, member, srcFunc);

            return(ifor.DoesNotExist(diag, SingleFunc(srcFunc)));
        }
コード例 #3
0
        public static IHaveToken <T2> Each <T1, T2>(this IForToken <T1> ifor,
                                                    Expression <Func <T1, IEnumerable <T2> > > srcFunc,
                                                    [CallerFilePath] string file     = "",
                                                    [CallerLineNumber] int line      = 0,
                                                    [CallerMemberName] string member = "")
        {
            var diag = DiagInfoExpressionFactory.CreateDiag(file, line, member, srcFunc);

            return(ifor.Each(diag, srcFunc.Compile()));
        }
コード例 #4
0
        public static IHaveToken <T1> Exists <T1>(this IRegister register,
                                                  Expression <Func <IEnumerable <T1> > > srcFunc,
                                                  [CallerFilePath] string file     = "",
                                                  [CallerLineNumber] int line      = 0,
                                                  [CallerMemberName] string member = "")
        {
            var diag = DiagInfoExpressionFactory.CreateDiag(file, line, member, srcFunc);

            return(register.Exists(diag, srcFunc.Compile()));
        }
コード例 #5
0
        public static void IsNot <T1, T2>(this IFor <T1> ifor,
                                          string name,
                                          Expression <Func <T1, T2> > srcFunc,
                                          [CallerFilePath] string file     = "",
                                          [CallerLineNumber] int line      = 0,
                                          [CallerMemberName] string member = "")
        {
            var diag = DiagInfoExpressionFactory.CreateDiag(file, line, member, srcFunc);

            ifor.DoesNotExist(diag, name, TestingContextLimitedInterface.ExpressionalInterfaceExtension.SingleFunc(srcFunc));
        }
コード例 #6
0
        public static void DoesNotExist <T1, T2>(this IFor <T1> ifor,
                                                 string name,
                                                 Expression <Func <T1, IEnumerable <T2> > > srcFunc,
                                                 [CallerFilePath] string file     = "",
                                                 [CallerLineNumber] int line      = 0,
                                                 [CallerMemberName] string member = "")
        {
            var diag = DiagInfoExpressionFactory.CreateDiag(file, line, member, srcFunc);

            ifor.DoesNotExist(diag, name, srcFunc.Compile());
        }