Changeset 1101 for trunk/DevTestMethods


Ignore:
Timestamp:
Jan 20, 2010, 6:57:29 PM (12 years ago)
Author:
Matthäus Wander
Message:

CStream:

  • added another ReadFully() overload + test case
  • added compatibility to act like a readable CryptoolStream
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DevTestMethods/CrypPluginBase/CStream.cs

    r1091 r1101  
    259259            Assert.IsFalse(File.Exists(filePath));
    260260        }
     261
     262        [TestMethod]
     263        public void TestExhaustiveRead()
     264        {
     265            CStreamWriter writer = new CStreamWriter();
     266
     267            writer.Write(LongData);
     268            writer.Write(LongData);
     269            writer.Write(LongData);
     270            writer.Close();
     271
     272            CStream reader = writer.CreateReader();
     273            byte[] bigbuf = reader.ReadFully();
     274
     275            Assert.AreEqual(LongData.Length * 3, bigbuf.Length);
     276        }
    261277    }
    262278}
Note: See TracChangeset for help on using the changeset viewer.