public void TemporaryFileDetachTest()
{
string path = string.Empty;
using( TemporaryFile temporaryFile = new TemporaryFile( true, null ) )
{
path = temporaryFile.Path;
Assert.That( File.Exists( temporaryFile.Path ), Is.True );
Assert.That( (File.GetAttributes( temporaryFile.Path ) & FileAttributes.Temporary) == FileAttributes.Temporary, Is.True );
temporaryFile.Detach();
}
Assert.That( File.Exists( path ), Is.True );
File.Delete( path );
}
}