Exemple #1
0
        public void TestSimpleSum()
        {
            var q = new QueriableDummy <ntup>();
            var s = q.Sum(i => i.run);

            var result = DummyQueryExectuor.FinalResult;

            result.DumpCodeToConsole();

            //
            // Look for the assignment operator in the loop
            //

            var toplevel = result.CodeBody.Statements;
            var assign   = toplevel.First() as LINQToTTreeLib.Statements.StatementAssign;

            Assert.IsNotNull(assign, "Assign statement missing");

            Assert.IsTrue(assign.Expression.RawValue.Contains("+"), "the plus sign is missing");
        }