public virtual void TestNoDir()
{
var tempDir = CreateTempDir("doesnotexist").FullName;
System.IO.Directory.Delete(tempDir, true);
using (Directory dir = new NRTCachingDirectory(NewFSDirectory(new DirectoryInfo(tempDir)), 2.0, 25.0))
{
try
{
Assert.False(System.IO.Directory.Exists(tempDir));
DirectoryReader.Open(dir);
Assert.Fail("did not hit expected exception");
}
catch (NoSuchDirectoryException)
{
// expected
}
}
}