private static void OneByteSourceTest(int bufSize)
        {
            byte nnn = 123;
            var data = new byte[] { nnn };
            var strm = new MemoryStream (data);

            var src = new StreamBufferedSource (strm, new byte[bufSize]);
            src.EnsureBuffer (1);
            Assert.AreEqual (nnn, src.Buffer[src.Offset]);
            src.SkipBuffer (1);
            Assert.AreEqual (0, src.FillBuffer ());
            Assert.IsTrue (src.IsExhausted);
            Assert.AreEqual (0, src.Count);

            strm.Seek (0, SeekOrigin.Begin);
            src = new StreamBufferedSource (strm, new byte[bufSize]);
            Assert.AreEqual (1, src.FillBuffer ());
            Assert.AreEqual (nnn, src.Buffer[src.Offset]);
            Assert.AreEqual (1, src.TrySkip (bufSize));
            Assert.AreEqual (0, src.FillBuffer ());
            Assert.IsTrue (src.IsExhausted);
            Assert.AreEqual (0, src.Count);
        }
        // проверяем 2 блока по 3 байта перед каждым делаем пропуск
        private static void SkipTest3SkipTest3SkipTest(
			long dataSize,
			bool canSeek,
			int bufSize,
			int skipBuffer1,
			int skipBuffer2,
			long skipOverall1,
			long skipOverall2,
			long skipOverEnd)
        {
            System.Diagnostics.Trace.WriteLine (string.Format ("dataSize = {0}, canSeek = {7}, bufSize = {1}, skipOverall1 = {2}, skipOverall2 = {3}, skipOverEnd = {4}, skipBuffer1 = {5}, skipBuffer2 = {6}", dataSize, bufSize, skipOverall1, skipOverall2, skipOverEnd, skipBuffer1, skipBuffer2, canSeek));
            var strm = new BigStreamMock (dataSize, canSeek, FillFunction);
            var src = new StreamBufferedSource (strm, new byte[bufSize]);
            src.EnsureBuffer (3);
            Assert.AreEqual (FillFunction(0), src.Buffer[src.Offset]);
            Assert.AreEqual (FillFunction(1), src.Buffer[src.Offset + 1]);
            Assert.AreEqual (FillFunction(2), src.Buffer[src.Offset + 2]);
            Assert.AreEqual (skipOverall1, src.TrySkip (skipOverall1));
            src.EnsureBuffer (skipBuffer1);
            src.SkipBuffer (skipBuffer1);
            src.EnsureBuffer (3);
            Assert.AreEqual (FillFunction(skipOverall1 + skipBuffer1), src.Buffer[src.Offset]);
            Assert.AreEqual (FillFunction(skipOverall1 + skipBuffer1 + 1), src.Buffer[src.Offset + 1]);
            Assert.AreEqual (FillFunction(skipOverall1 + skipBuffer1 + 2), src.Buffer[src.Offset + 2]);
            Assert.AreEqual (skipOverall2, src.TrySkip (skipOverall2));
            src.EnsureBuffer (skipBuffer2);
            src.SkipBuffer (skipBuffer2);
            src.EnsureBuffer (3);
            Assert.AreEqual (FillFunction(skipOverall1 + skipOverall2 + skipBuffer1 + skipBuffer2), src.Buffer[src.Offset]);
            Assert.AreEqual (FillFunction(skipOverall1 + skipOverall2 + skipBuffer1 + skipBuffer2 + 1), src.Buffer[src.Offset + 1]);
            Assert.AreEqual (FillFunction(skipOverall1 + skipOverall2 + skipBuffer1 + skipBuffer2 + 2), src.Buffer[src.Offset + 2]);
            Assert.AreEqual (dataSize - skipOverall1 - skipOverall2 - skipBuffer1 - skipBuffer2, src.TrySkip (skipOverEnd));
            Assert.IsTrue (src.IsExhausted);
            Assert.AreEqual (0, src.Count);
        }