lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [4/4] lucenenet git commit: Fixing tests by catching the right exception
Date Wed, 08 Apr 2015 17:01:03 GMT
Fixing tests by catching the right exception


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/31a43f02
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/31a43f02
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/31a43f02

Branch: refs/heads/master
Commit: 31a43f02a9dd9bbffaa5d728d0e942642a74dd79
Parents: 4436360
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Wed Apr 8 20:00:45 2015 +0300
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Wed Apr 8 20:00:45 2015 +0300

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs     | 2 +-
 src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/31a43f02/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs b/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
index a3d0c49..7eda017 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
@@ -743,7 +743,7 @@ namespace Lucene.Net.Index
                 DirectoryReader.Open(dir);
                 Assert.Fail("did not hit expected exception");
             }
-            catch (NoSuchDirectoryException nsde)
+            catch (IndexNotFoundException nsde)
             {
                 // expected
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/31a43f02/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs b/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
index 4f3b773..6cfa6f0 100644
--- a/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Index;
 using Lucene.Net.Support;
 using NUnit.Framework;
 using System.Collections.Generic;
@@ -118,7 +119,7 @@ namespace Lucene.Net.Store
                 DirectoryReader.Open(dir);
                 Assert.Fail("did not hit expected exception");
             }
-            catch (NoSuchDirectoryException nsde)
+            catch (IndexNotFoundException nsde)
             {
                 // expected
             }


Mime
View raw message