lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [2/3] lucenenet git commit: initialize test doc on each test run
Date Sun, 01 Mar 2015 19:27:52 GMT
initialize test doc on each test run


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

Branch: refs/heads/master
Commit: 62c02b39ebda35e6995ba6b261547b8b33e70ad5
Parents: 3a025d9
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sun Mar 1 12:25:53 2015 -0500
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sun Mar 1 12:25:53 2015 -0500

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestSegmentReader.cs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/62c02b39/src/Lucene.Net.Tests/core/Index/TestSegmentReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestSegmentReader.cs b/src/Lucene.Net.Tests/core/Index/TestSegmentReader.cs
index d90e8cb..8805748 100644
--- a/src/Lucene.Net.Tests/core/Index/TestSegmentReader.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestSegmentReader.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index
@@ -33,8 +34,8 @@ namespace Lucene.Net.Index
     public class TestSegmentReader : LuceneTestCase
     {
         private Directory Dir;
-        private Document TestDoc = new Document();
-        private SegmentReader Reader = null;
+        private Document TestDoc;
+        private SegmentReader Reader;
 
         //TODO: Setup the reader w/ multiple documents
         [SetUp]
@@ -42,6 +43,7 @@ namespace Lucene.Net.Index
         {
             base.SetUp();
             Dir = NewDirectory();
+            TestDoc = new Document();
             DocHelper.SetupDoc(TestDoc);
             SegmentCommitInfo info = DocHelper.WriteDoc(Random(), Dir, TestDoc);
             Reader = new SegmentReader(info, DirectoryReader.DEFAULT_TERMS_INDEX_DIVISOR,
IOContext.READ);


Mime
View raw message