public virtual void TestNoDir() { Directory dir = FSDirectory.Open(_TestUtil.GetTempDir("doesnotexist")); Assert.Throws<NoSuchDirectoryException>(() => IndexReader.Open(dir, true), "did not hit expected exception"); dir.Close(); }