public void TopLevelResultOperatorSkip() { // A query that should come back with 10 items. var q = new QueriableDummy <TestNtupe>(); var dude = q.Take(10).Count(); var query = DummyQueryExectuor.LastQueryModel; Assert.IsTrue(query.HasStatefulOperator()); }
public void TestTakeSkipAtSource() { var q = new QueriableDummy <ntup>(); var c = q.Take(5).Count(); Assert.IsNotNull(DummyQueryExectuor.FinalResult, "Expecting some code to have been generated!"); var res = DummyQueryExectuor.FinalResult; res.DumpCodeToConsole(); Assert.AreEqual(1, res.CodeBody.DeclaredVariables.Where(v => v.DeclareAsStatic).Count()); Assert.AreEqual(1, res.CodeBody.DeclaredVariables.Count()); }
public void TestTakeSkipAtSource() { var q = new QueriableDummy<ntup>(); var c = q.Take(5).Count(); Assert.IsNotNull(DummyQueryExectuor.FinalResult, "Expecting some code to have been generated!"); var res = DummyQueryExectuor.FinalResult; res.DumpCodeToConsole(); Assert.AreEqual(1, res.CodeBody.DeclaredVariables.Where(v => v.DeclareAsStatic).Count()); Assert.AreEqual(1, res.CodeBody.DeclaredVariables.Count()); }