public void OpenWrite() { string tempFile = Path.GetTempFileName(); ExtendedFileInfo efi = new ExtendedFileInfo(tempFile); Assert.IsNotNull(efi); using (FileStream stream = efi.OpenWrite()) { Assert.IsFalse(stream.CanRead); Assert.IsTrue(stream.CanWrite); } }