private void Read (string filename)
{
byte[] buffer = new byte[8];
using (IsolatedStorageFileStream read = new IsolatedStorageFileStream (filename, FileMode.Open, FileAccess.Read)) {
Assert.AreEqual (8, read.Length, "Length");
Assert.AreEqual (0, read.Position, "Position");
Assert.IsTrue (read.CanRead, "read.CanRead");
Assert.IsTrue (read.CanSeek, "read.CanSeek");
Assert.IsFalse (read.CanWrite, "read.CanWrite");
Assert.IsFalse (read.IsAsync, "read.IsAync");
Assert.AreEqual (buffer.Length, read.ReadByte (), "ReadByte");
read.Seek (0, SeekOrigin.Begin);
Assert.AreEqual (buffer.Length, read.Read (buffer, 0, buffer.Length), "Read");
read.Close ();
}
}