Library/Library.Test/TestTempFiles.cs
C# | Copy Code |
---|---|
TempFile file = new TempFile();
Stream r = file.Read();
Assert.IsFalse(r.CanWrite);
Assert.IsTrue(r.CanRead);
Stream o = file.Open();
Assert.IsTrue(o.CanWrite);
Assert.IsTrue(o.CanRead);
o.Dispose();
r.Dispose();
file.Dispose(); |
VB.NET | Copy Code |
---|---|
Dim file As New TempFile() Dim r As Stream = file.Read() Assert.IsFalse(r.CanWrite) Assert.IsTrue(r.CanRead) Dim o As Stream = file.Open() Assert.IsTrue(o.CanWrite) Assert.IsTrue(o.CanRead) o.Dispose() r.Dispose() file.Dispose() |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
TempFile ClassTempFile Members
Used By
BasicFileTests.TestRecoverCorruptedFile()TestResXtoMcByProject.TestGenerateWin32Resource()
TestResXtoMcByProject.TestProjectResXVersionByAssembly()
TestResXtoMcByProject.TestProjectResXWithBadAssemblyInfo()