public void TestCombinedCrcStream_ExactLengthRead()
        {
            BZip2DecoderStream decoder = new BZip2DecoderStream(new MemoryStream(InvalidCombinedCrcData), Ownership.Dispose);

            byte[] buffer = new byte[21];
            int numRead = decoder.Read(buffer, 0, 21);
        }
        public void TestCombinedCrcStream()
        {
            BZip2DecoderStream decoder = new BZip2DecoderStream(new MemoryStream(InvalidCombinedCrcData), Ownership.Dispose);

            byte[] buffer = new byte[1024];
            int numRead = decoder.Read(buffer, 0, 1024);
        }
        public void TestCombinedCrcStream_ExactLengthRead()
        {
            BZip2DecoderStream decoder = new BZip2DecoderStream(new MemoryStream(InvalidCombinedCrcData), Ownership.Dispose);

            byte[] buffer  = new byte[21];
            int    numRead = decoder.Read(buffer, 0, 21);
        }
        public void TestCombinedCrcStream()
        {
            BZip2DecoderStream decoder = new BZip2DecoderStream(new MemoryStream(InvalidCombinedCrcData), Ownership.Dispose);

            byte[] buffer  = new byte[1024];
            int    numRead = decoder.Read(buffer, 0, 1024);
        }
        public void TestValidStream()
        {
            BZip2DecoderStream decoder = new BZip2DecoderStream(new MemoryStream(ValidData), Ownership.Dispose);

            byte[] buffer  = new byte[1024];
            int    numRead = decoder.Read(buffer, 0, 1024);

            Assert.AreEqual(21, numRead);

            string s = Encoding.ASCII.GetString(buffer, 0, numRead);

            Assert.AreEqual("This is a test string", s);
        }
        public void TestValidStream()
        {
            BZip2DecoderStream decoder = new BZip2DecoderStream(new MemoryStream(ValidData), Ownership.Dispose);

            byte[] buffer = new byte[1024];
            int numRead = decoder.Read(buffer, 0, 1024);
            Assert.AreEqual(21, numRead);

            string s = Encoding.ASCII.GetString(buffer, 0, numRead);
            Assert.AreEqual("This is a test string", s);
        }