public void TestQueryStatsHasExecuteHasFetch()
        {
            var executeResult   = TestingUtilities.GetExecuteResultWithStats(ValueHolderList, ExecuteIO, ExecuteTiming);
            var fetchPageResult = TestingUtilities.GetFetchResultWithStats(ValueHolderList, FetchIO, FetchTiming);

            mockSession.Setup(m => m.FetchPage(It.IsAny <string>(), It.IsAny <string>()))
            .Returns(fetchPageResult);

            var result = new Result(mockSession.Object, "txnId", executeResult);

            var io     = result.GetConsumedIOs();
            var timing = result.GetTimingInformation();

            Assert.AreEqual(ExecuteReads, io?.ReadIOs);
            Assert.AreEqual(ExecuteWrites, io?.WriteIOs);
            Assert.AreEqual(ExecuteTime, timing?.ProcessingTimeMilliseconds);

            var results = result.GetEnumerator();

            while (results.MoveNext())
            {
                // Fetch the next page
            }

            io     = result.GetConsumedIOs();
            timing = result.GetTimingInformation();
            Assert.AreEqual(ExecuteReads + FetchReads, io?.ReadIOs);
            Assert.AreEqual(ExecuteWrites + FetchWrites, io?.WriteIOs);
            Assert.AreEqual(ExecuteTime + FetchTime, timing?.ProcessingTimeMilliseconds);
        }
        public void TestQueryStatsNullExecuteNullFetch()
        {
            var executeResult   = TestingUtilities.GetExecuteResultNullStats(ValueHolderList);
            var fetchPageResult = TestingUtilities.GetFetchResultNullStats(ValueHolderList);

            mockSession.Setup(m => m.FetchPage(It.IsAny <string>(), It.IsAny <string>()))
            .Returns(fetchPageResult);

            var result = new Result(mockSession.Object, "txnId", executeResult);

            var io     = result.GetConsumedIOs();
            var timing = result.GetTimingInformation();

            Assert.IsNull(io);
            Assert.IsNull(timing);

            var results = result.GetEnumerator();

            while (results.MoveNext())
            {
                // Fetch the next page
            }

            io     = result.GetConsumedIOs();
            timing = result.GetTimingInformation();
            Assert.IsNull(io);
            Assert.IsNull(timing);
        }