public void ThrowsIOExceptionWhenFileIsAlreadyOpen()
            {
                var file = new PlatformFile(this.platformFile);

                using (Stream previouslyOpenedStream = FileSystemTest.OpenPlatformFile(this.platformFile))
                {
                    AssertEx.Throws <IOException>(() => file.Open());
                }
            }
            public void ReturnsStreamThatCanBeUsedToModifyFileContents()
            {
                var file = new PlatformFile(this.platformFile);

                var writtenBytes = new byte[] { 4, 2 };

                PlatformFileTest.WriteBytesAndDispose(file.Open(), writtenBytes);

                byte[] readBytes = ReadBytesAndDispose(FileSystemTest.OpenPlatformFile(this.platformFile));
                AssertEx.AreEqual(writtenBytes, readBytes);
            }