You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2016/10/23 13:01:47 UTC

[01/50] [abbrv] lucenenet git commit: Removed LongRunningTest attribute from Core.Util.Automaton.TestUTF32ToUTF8.TestRandomRegexes() because it only takes a few seconds

Repository: lucenenet
Updated Branches:
  refs/heads/master 686b75113 -> dec66102d


Removed LongRunningTest attribute from Core.Util.Automaton.TestUTF32ToUTF8.TestRandomRegexes() because it only takes a few seconds


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

Branch: refs/heads/master
Commit: 325851d68c59aabd3508c03c6f9764ff00c4772f
Parents: d992e66
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 15 21:39:06 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:49 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/Automaton/TestUTF32ToUTF8.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/325851d6/src/Lucene.Net.Tests/core/Util/Automaton/TestUTF32ToUTF8.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Automaton/TestUTF32ToUTF8.cs b/src/Lucene.Net.Tests/core/Util/Automaton/TestUTF32ToUTF8.cs
index 0349167..d7e9bc5 100644
--- a/src/Lucene.Net.Tests/core/Util/Automaton/TestUTF32ToUTF8.cs
+++ b/src/Lucene.Net.Tests/core/Util/Automaton/TestUTF32ToUTF8.cs
@@ -236,7 +236,7 @@ namespace Lucene.Net.Util.Automaton
             Assert.IsTrue(bra.Run(bytes, 0, bytes.Length));
         }
 
-        [Test, LongRunningTest]
+        [Test]
         public void TestRandomRegexes()
         {
             int num = AtLeast(250);


[31/50] [abbrv] lucenenet git commit: Revert "HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context."

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
index 998b942..acdf73c 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
@@ -100,94 +100,5 @@ namespace Lucene.Net.Codecs.Compressing
                 this.OuterInstance = outerInstance;
             }
         }
-
-
-        #region BaseStoredFieldsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestRandomStoredFields()
-        {
-            base.TestRandomStoredFields();
-        }
-
-        [Test]
-        // LUCENE-1727: make sure doc fields are stored in order
-        public override void TestStoredFieldsOrder()
-        {
-            base.TestStoredFieldsOrder();
-        }
-
-        [Test]
-        // LUCENE-1219
-        public override void TestBinaryFieldOffsetLength()
-        {
-            base.TestBinaryFieldOffsetLength();
-        }
-
-        [Test]
-        public override void TestNumericField()
-        {
-            base.TestNumericField();
-        }
-
-        [Test]
-        public override void TestIndexedBit()
-        {
-            base.TestIndexedBit();
-        }
-
-        [Test]
-        public override void TestReadSkip()
-        {
-            base.TestReadSkip();
-        }
-
-        [Test]
-        public override void TestEmptyDocs()
-        {
-            base.TestEmptyDocs();
-        }
-
-        [Test]
-        public override void TestConcurrentReads()
-        {
-            base.TestConcurrentReads();
-        }
-
-        [Test]
-        public override void TestWriteReadMerge()
-        {
-            base.TestWriteReadMerge();
-        }
-
-        [Test, Timeout(300000)]
-        public override void TestBigDocuments()
-        {
-            base.TestBigDocuments();
-        }
-
-        [Test]
-        public override void TestBulkMergeWithDeletes()
-        {
-            base.TestBulkMergeWithDeletes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
index 709af74..90b06cf 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
@@ -84,72 +84,5 @@ namespace Lucene.Net.Codecs.Compressing
             iw.Dispose();
             dir.Dispose();
         }
-
-
-        #region BaseTermVectorsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        // only one doc with vectors
-        public override void TestRareVectors()
-        {
-            base.TestRareVectors();
-        }
-
-        [Test]
-        public override void TestHighFreqs()
-        {
-            base.TestHighFreqs();
-        }
-
-        [Test]
-        public override void TestLotsOfFields()
-        {
-            base.TestLotsOfFields();
-        }
-
-        [Test]
-        // different options for the same field
-        public override void TestMixedOptions()
-        {
-            base.TestMixedOptions();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test, Timeout(30000)]
-        public override void TestMerge()
-        {
-            base.TestMerge();
-        }
-
-        [Test]
-        // run random tests from different threads to make sure the per-thread clones
-        // don't share mutable data
-        public override void TestClone()
-        {
-            base.TestClone();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
index 6a74a51..dd7d708 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
@@ -28,86 +28,5 @@ namespace Lucene.Net.Codecs.Compressing
             base.SetUp();
             Mode = CompressionMode.FAST;
         }
-
-
-        #region AbstractTestLZ4CompressionMode
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestShortLiteralsAndMatchs()
-        {
-            base.TestShortLiteralsAndMatchs();
-        }
-
-        [Test]
-        public override void TestLongMatchs()
-        {
-            base.TestLongMatchs();
-        }
-
-        [Test]
-        public override void TestLongLiterals()
-        {
-            base.TestLongLiterals();
-        }
-
-        [Test]
-        public override void TestMatchRightBeforeLastLiterals()
-        {
-            base.TestMatchRightBeforeLastLiterals();
-        }
-
-        #endregion
-
-        #region AbstractTestCompressionMode
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDecompress()
-        {
-            base.TestDecompress();
-        }
-
-        [Test]
-        public override void TestPartialDecompress()
-        {
-            base.TestPartialDecompress();
-        }
-
-        [Test]
-        public override void TestEmptySequence()
-        {
-            base.TestEmptySequence();
-        }
-
-        [Test]
-        public override void TestShortSequence()
-        {
-            base.TestShortSequence();
-        }
-
-        [Test]
-        public override void TestIncompressible()
-        {
-            base.TestIncompressible();
-        }
-
-        [Test]
-        public override void TestConstant()
-        {
-            base.TestConstant();
-        }
-
-        [Test]
-        public override void TestLUCENE5201()
-        {
-            base.TestLUCENE5201();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
index b90a582..d7fc0b0 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
@@ -38,86 +38,5 @@ namespace Lucene.Net.Codecs.Compressing
             Assert.IsTrue(compressed.Length <= compressed2.Length);
             return compressed;
         }
-
-
-        #region AbstractTestLZ4CompressionMode
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestShortLiteralsAndMatchs()
-        {
-            base.TestShortLiteralsAndMatchs();
-        }
-
-        [Test]
-        public override void TestLongMatchs()
-        {
-            base.TestLongMatchs();
-        }
-
-        [Test]
-        public override void TestLongLiterals()
-        {
-            base.TestLongLiterals();
-        }
-
-        [Test]
-        public override void TestMatchRightBeforeLastLiterals()
-        {
-            base.TestMatchRightBeforeLastLiterals();
-        }
-
-        #endregion
-
-        #region AbstractTestCompressionMode
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDecompress()
-        {
-            base.TestDecompress();
-        }
-
-        [Test]
-        public override void TestPartialDecompress()
-        {
-            base.TestPartialDecompress();
-        }
-
-        [Test]
-        public override void TestEmptySequence()
-        {
-            base.TestEmptySequence();
-        }
-
-        [Test]
-        public override void TestShortSequence()
-        {
-            base.TestShortSequence();
-        }
-
-        [Test]
-        public override void TestIncompressible()
-        {
-            base.TestIncompressible();
-        }
-
-        [Test]
-        public override void TestConstant()
-        {
-            base.TestConstant();
-        }
-
-        [Test]
-        public override void TestLUCENE5201()
-        {
-            base.TestLUCENE5201();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
index 679d1f0..eebcda1 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
@@ -28,55 +28,5 @@ namespace Lucene.Net.Codecs.Compressing
             base.SetUp();
             Mode = CompressionMode.HIGH_COMPRESSION;
         }
-
-
-        #region AbstractTestCompressionMode
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDecompress()
-        {
-            base.TestDecompress();
-        }
-
-        [Test]
-        public override void TestPartialDecompress()
-        {
-            base.TestPartialDecompress();
-        }
-
-        [Test]
-        public override void TestEmptySequence()
-        {
-            base.TestEmptySequence();
-        }
-
-        [Test]
-        public override void TestShortSequence()
-        {
-            base.TestShortSequence();
-        }
-
-        [Test]
-        public override void TestIncompressible()
-        {
-            base.TestIncompressible();
-        }
-
-        [Test]
-        public override void TestConstant()
-        {
-            base.TestConstant();
-        }
-
-        [Test]
-        public override void TestLUCENE5201()
-        {
-            base.TestLUCENE5201();
-        }
-        #endregion
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
index 0ab9a7b..cf1bafc 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
@@ -42,68 +42,5 @@ namespace Lucene.Net.Codecs.Lucene3x
                 return Codec_Renamed;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
index d3d0889..b28f86a 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
@@ -52,89 +52,5 @@ namespace Lucene.Net.Codecs.Lucene3x
             // for 3.x: we currently cannot take an index with existing 4.x segments
             // and merge into newly formed 3.x segments.
         }
-
-
-
-        #region BaseStoredFieldsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestRandomStoredFields()
-        {
-            base.TestRandomStoredFields();
-        }
-
-        [Test]
-        // LUCENE-1727: make sure doc fields are stored in order
-        public override void TestStoredFieldsOrder()
-        {
-            base.TestStoredFieldsOrder();
-        }
-
-        [Test]
-        // LUCENE-1219
-        public override void TestBinaryFieldOffsetLength()
-        {
-            base.TestBinaryFieldOffsetLength();
-        }
-
-        [Test]
-        public override void TestNumericField()
-        {
-            base.TestNumericField();
-        }
-
-        [Test]
-        public override void TestIndexedBit()
-        {
-            base.TestIndexedBit();
-        }
-
-        [Test]
-        public override void TestReadSkip()
-        {
-            base.TestReadSkip();
-        }
-
-        [Test]
-        public override void TestEmptyDocs()
-        {
-            base.TestEmptyDocs();
-        }
-
-        [Test]
-        public override void TestConcurrentReads()
-        {
-            base.TestConcurrentReads();
-        }
-
-        [Test, Timeout(120000)]
-        public override void TestBigDocuments()
-        {
-            base.TestBigDocuments();
-        }
-
-        [Test]
-        public override void TestBulkMergeWithDeletes()
-        {
-            base.TestBulkMergeWithDeletes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
index 5756752..1cf090b 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
@@ -46,72 +46,5 @@ namespace Lucene.Net.Codecs.Lucene3x
         {
             return ValidOptions(Options.NONE, Options.POSITIONS_AND_OFFSETS);
         }
-
-
-        #region BaseTermVectorsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        // only one doc with vectors
-        public override void TestRareVectors()
-        {
-            base.TestRareVectors();
-        }
-
-        [Test]
-        public override void TestHighFreqs()
-        {
-            base.TestHighFreqs();
-        }
-
-        [Test]
-        public override void TestLotsOfFields()
-        {
-            base.TestLotsOfFields();
-        }
-
-        [Test, Timeout(300000)]
-        // different options for the same field
-        public override void TestMixedOptions()
-        {
-            base.TestMixedOptions();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test]
-        public override void TestMerge()
-        {
-            base.TestMerge();
-        }
-
-        [Test]
-        // run random tests from different threads to make sure the per-thread clones
-        // don't share mutable data
-        public override void TestClone()
-        {
-            base.TestClone();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
index 3686767..9ee39e7 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
@@ -50,506 +50,5 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             return false;
         }
-
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
index 0d3666d..c7f7f07 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
@@ -44,68 +44,5 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
index 4e3bebf..4e57234 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
@@ -41,94 +41,5 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
-
-
-        #region BaseStoredFieldsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestRandomStoredFields()
-        {
-            base.TestRandomStoredFields();
-        }
-
-        [Test]
-        // LUCENE-1727: make sure doc fields are stored in order
-        public override void TestStoredFieldsOrder()
-        {
-            base.TestStoredFieldsOrder();
-        }
-
-        [Test]
-        // LUCENE-1219
-        public override void TestBinaryFieldOffsetLength()
-        {
-            base.TestBinaryFieldOffsetLength();
-        }
-
-        [Test]
-        public override void TestNumericField()
-        {
-            base.TestNumericField();
-        }
-
-        [Test]
-        public override void TestIndexedBit()
-        {
-            base.TestIndexedBit();
-        }
-
-        [Test]
-        public override void TestReadSkip()
-        {
-            base.TestReadSkip();
-        }
-
-        [Test, Timeout(300000)]
-        public override void TestEmptyDocs()
-        {
-            base.TestEmptyDocs();
-        }
-
-        [Test, Timeout(300000)]
-        public override void TestConcurrentReads()
-        {
-            base.TestConcurrentReads();
-        }
-
-        [Test]
-        public override void TestWriteReadMerge()
-        {
-            base.TestWriteReadMerge();
-        }
-
-        [Test, Timeout(80000)]
-        public override void TestBigDocuments()
-        {
-            base.TestBigDocuments();
-        }
-
-        [Test]
-        public override void TestBulkMergeWithDeletes()
-        {
-            base.TestBulkMergeWithDeletes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
index 9a6e544..342d7ce 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
@@ -41,72 +41,5 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
-
-
-        #region BaseTermVectorsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        // only one doc with vectors
-        public override void TestRareVectors()
-        {
-            base.TestRareVectors();
-        }
-
-        [Test]
-        public override void TestHighFreqs()
-        {
-            base.TestHighFreqs();
-        }
-
-        [Test]
-        public override void TestLotsOfFields()
-        {
-            base.TestLotsOfFields();
-        }
-
-        [Test, Timeout(300000)]
-        // different options for the same field
-        public override void TestMixedOptions()
-        {
-            base.TestMixedOptions();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test]
-        public override void TestMerge()
-        {
-            base.TestMerge();
-        }
-
-        [Test]
-        // run random tests from different threads to make sure the per-thread clones
-        // don't share mutable data
-        public override void TestClone()
-        {
-            base.TestClone();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
index fb309a5..201eaf6 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
@@ -1,5 +1,3 @@
-using NUnit.Framework;
-
 namespace Lucene.Net.Codecs.Lucene41
 {
     /*
@@ -36,68 +34,5 @@ namespace Lucene.Net.Codecs.Lucene41
                 return Codec_Renamed;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
index bcd5a49..4259478 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
@@ -40,94 +40,5 @@ namespace Lucene.Net.Codecs.Lucene41
                 return new Lucene41RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
-
-
-        #region BaseStoredFieldsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestRandomStoredFields()
-        {
-            base.TestRandomStoredFields();
-        }
-
-        [Test]
-        // LUCENE-1727: make sure doc fields are stored in order
-        public override void TestStoredFieldsOrder()
-        {
-            base.TestStoredFieldsOrder();
-        }
-
-        [Test]
-        // LUCENE-1219
-        public override void TestBinaryFieldOffsetLength()
-        {
-            base.TestBinaryFieldOffsetLength();
-        }
-
-        [Test]
-        public override void TestNumericField()
-        {
-            base.TestNumericField();
-        }
-
-        [Test]
-        public override void TestIndexedBit()
-        {
-            base.TestIndexedBit();
-        }
-
-        [Test]
-        public override void TestReadSkip()
-        {
-            base.TestReadSkip();
-        }
-
-        [Test, Timeout(300000)]
-        public override void TestEmptyDocs()
-        {
-            base.TestEmptyDocs();
-        }
-
-        [Test, Timeout(300000)]
-        public override void TestConcurrentReads()
-        {
-            base.TestConcurrentReads();
-        }
-
-        [Test]
-        public override void TestWriteReadMerge()
-        {
-            base.TestWriteReadMerge();
-        }
-
-        [Test, Timeout(120000)]
-        public override void TestBigDocuments()
-        {
-            base.TestBigDocuments();
-        }
-
-        [Test]
-        public override void TestBulkMergeWithDeletes()
-        {
-            base.TestBulkMergeWithDeletes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
index 598f373..7f4438b 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
@@ -51,531 +51,5 @@ namespace Lucene.Net.Codecs.Lucene42
         {
             return false;
         }
-
-
-        #region BaseCompressingDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestUniqueValuesCompression()
-        {
-            base.TestUniqueValuesCompression();
-        }
-
-        [Test]
-        public override void TestDateCompression()
-        {
-            base.TestDateCompression();
-        }
-
-        [Test]
-        public override void TestSingleBigValueCompression()
-        {
-            base.TestSingleBigValueCompression();
-        }
-
-        #endregion
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
index dc18580..2ce76f3 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
@@ -1,5 +1,3 @@
-using NUnit.Framework;
-
 namespace Lucene.Net.Codecs.Lucene45
 {
     /*
@@ -36,530 +34,5 @@ namespace Lucene.Net.Codecs.Lucene45
                 return Codec_Renamed;
             }
         }
-
-        #region BaseCompressingDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestUniqueValuesCompression()
-        {
-            base.TestUniqueValuesCompression();
-        }
-
-        [Test]
-        public override void TestDateCompression()
-        {
-            base.TestDateCompression();
-        }
-
-        [Test]
-        public override void TestSingleBigValueCompression()
-        {
-            base.TestSingleBigValueCompression();
-        }
-
-        #endregion
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file


[25/50] [abbrv] lucenenet git commit: Ported the tests for ByteBuffer from Java and refactored ByteBuffer. Also ported LongBuffer + tests (required by Core.Util.TestPackedInts.TestEncodeDecode()).

Posted by ni...@apache.org.
Ported the tests for ByteBuffer from Java and refactored ByteBuffer. Also ported LongBuffer + tests (required by Core.Util.TestPackedInts.TestEncodeDecode()).


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

Branch: refs/heads/master
Commit: d235115dd661bfdf843a8fef8a94b39e16600c98
Parents: 2fc1ad2
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Oct 19 05:33:36 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:58 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Lucene.Net.csproj           |    4 +-
 src/Lucene.Net.Core/Support/Buffer.cs           |  414 ++++-
 src/Lucene.Net.Core/Support/BufferExceptions.cs |   24 +
 .../Support/BufferUnderflowException.cs         |    8 -
 src/Lucene.Net.Core/Support/ByteBuffer.cs       | 1532 +++++++++++++++---
 src/Lucene.Net.Core/Support/ByteOrder.cs        |   17 +
 src/Lucene.Net.Core/Support/LongBuffer.cs       |  422 +++++
 .../Support/MemoryMappedFileByteBuffer.cs       |   17 +-
 src/Lucene.Net.Tests/Lucene.Net.Tests.csproj    |    3 +
 .../core/Support/BaseBufferTestCase.cs          |  130 ++
 .../core/Support/TestByteBuffer.cs              |  739 +++++++++
 .../core/Support/TestLongBuffer.cs              |  522 ++++++
 .../core/Util/Packed/TestPackedInts.cs          |   62 +-
 13 files changed, 3572 insertions(+), 322 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Lucene.Net.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.csproj b/src/Lucene.Net.Core/Lucene.Net.csproj
index 99729f8..75817c5 100644
--- a/src/Lucene.Net.Core/Lucene.Net.csproj
+++ b/src/Lucene.Net.Core/Lucene.Net.csproj
@@ -612,10 +612,11 @@
     <Compile Include="Support\Buffer.cs" />
     <Compile Include="Support\AttributeImplItem.cs" />
     <Compile Include="Support\BitSetSupport.cs" />
-    <Compile Include="Support\BufferUnderflowException.cs" />
+    <Compile Include="Support\BufferExceptions.cs" />
     <Compile Include="Support\BuildType.cs" />
     <Compile Include="Support\ByteArrayOutputStream.cs" />
     <Compile Include="Support\ByteBuffer.cs" />
+    <Compile Include="Support\ByteOrder.cs" />
     <Compile Include="Support\Character.cs" />
     <Compile Include="Support\Arrays.cs" />
     <Compile Include="Support\CharacterIterator.cs" />
@@ -638,6 +639,7 @@
     <Compile Include="Support\IDictionaryExtensions.cs" />
     <Compile Include="Support\LimitedConcurrencyLevelTaskScheduler.cs" />
     <Compile Include="Support\ListExtensions.cs" />
+    <Compile Include="Support\LongBuffer.cs" />
     <Compile Include="Support\LurchTable.cs" />
     <Compile Include="Support\MathExtension.cs" />
     <Compile Include="Support\MemoryMappedFileByteBuffer.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Support/Buffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/Buffer.cs b/src/Lucene.Net.Core/Support/Buffer.cs
index 26fbed7..f40bcef 100644
--- a/src/Lucene.Net.Core/Support/Buffer.cs
+++ b/src/Lucene.Net.Core/Support/Buffer.cs
@@ -1,117 +1,397 @@
-\ufeffnamespace Lucene.Net.Support
+\ufeffusing System;
+
+namespace Lucene.Net.Support
 {
+    /// <summary>
+    /// Base class for <see cref="ByteBuffer"/> and <see cref="LongBuffer"/> (ported from Java)
+    /// </summary>
     public abstract class Buffer
     {
-        private int _mark = -1;
-        private int _position;
-        private int _capacity;
-        private int _limit;
+        private int mark = -1;
+        private int position;
+        private int capacity;
+        private int limit;
+
+        // Used only by direct buffers
+        // NOTE: hoisted here for speed in JNI GetDirectBufferAddress
+        internal long address;
 
-        public Buffer(int mark, int pos, int lim, int cap)
+        /// <summary>
+        /// Creates a new buffer with the given mark, position, limit, and capacity,
+        /// after checking invariants.
+        /// </summary>
+        internal Buffer(int mark, int pos, int lim, int cap)
         {
-            this._mark = mark;
-            this._position = pos;
-            this._limit = lim;
-            this._capacity = cap;
+            if (cap < 0)
+                throw new ArgumentException("Negative capacity: " + cap);
+            this.capacity = cap;
+            SetLimit(lim);
+            SetPosition(pos);
+            if (mark >= 0)
+            {
+                if (mark > pos)
+                    throw new ArgumentException("mark > position: ("
+                                                       + mark + " > " + pos + ")");
+                this.mark = mark;
+            }
         }
 
-        public abstract object Array { get; }
+        /// <summary>
+        /// Returns this buffer's capacity.
+        /// </summary>
+        public int Capacity
+        {
+            get { return capacity; }
+        }
 
-        public abstract int ArrayOffset { get; }
+        /// <summary>
+        /// Returns this buffer's position.
+        /// </summary>
+        public int Position
+        {
+            get { return position; }
+            set { SetPosition(value); }
+        }
 
-        public virtual int Capacity
+        /// <summary>
+        /// Sets this buffer's position.  If the mark is defined and larger than the
+        /// new position then it is discarded.
+        /// </summary>
+        /// <param name="newPosition">The new position value; must be non-negative and no larger than the current limit</param>
+        /// <returns>This buffer</returns>
+        /// <exception cref="ArgumentException">If the preconditions on <paramref name="newPosition"/> do not hold</exception>
+        public Buffer SetPosition(int newPosition)
         {
-            get { return _capacity; }
-            set
-            {
-                _capacity = value;
-            }
+            if ((newPosition > limit) || (newPosition < 0))
+                throw new ArgumentException();
+            position = newPosition;
+            if (mark > position) mark = -1;
+            return this;
         }
 
-        public virtual int Limit
+
+        /// <summary>
+        /// Returns this buffer's limit.
+        /// </summary>
+        public int Limit
         {
-            get { return _limit; }
-            set
-            {
-                _limit = value;
+            get { return limit; }
+            set { SetLimit(value); }
+        }
 
-                if (_position > _limit)
-                    _position = _limit;
+        /// <summary>
+        /// Sets this buffer's limit.  If the position is larger than the new limit
+        /// then it is set to the new limit.  If the mark is defined and larger than
+        /// the new limit then it is discarded.
+        /// </summary>
+        /// <param name="newLimit">The new limit value; must be non-negative and no larger than this buffer's capacity</param>
+        /// <returns>This buffer</returns>
+        /// <exception cref="ArgumentException">If the preconditions on <paramref name="newLimit"/> do not hold</exception>
+        public Buffer SetLimit(int newLimit)
+        {
+            if ((newLimit > capacity) || (newLimit < 0))
+                throw new ArgumentException();
+            limit = newLimit;
+            if (position > limit) position = limit;
+            if (mark > limit) mark = -1;
+            return this;
+        }
 
-                if (_mark > 0 && _mark > _limit)
-                    _mark = -1;
-            }
+        /// <summary>
+        /// Sets this buffer's mark at its position.
+        /// </summary>
+        /// <returns>This buffer</returns>
+        public Buffer Mark()
+        {
+            mark = position;
+            return this;
         }
 
-        public virtual int Position
+        /// <summary>
+        /// Resets this buffer's position to the previously-marked position.
+        /// 
+        /// <para>
+        /// Invoking this method neither changes nor discards the mark's
+        /// value.
+        /// </para>
+        /// </summary>
+        /// <returns>This buffer</returns>
+        /// <exception cref="InvalidMarkException">If the mark has not been set</exception>
+        public Buffer Reset()
         {
-            get { return _position; }
-            set
-            {
-                _position = value;
+            int m = mark;
+            if (m < 0)
+                throw new InvalidMarkException();
+            position = m;
+            return this;
+        }
 
-                if (_mark >= 0 && _mark > _position)
-                    _mark = -1;
-            }
+        /// <summary>
+        /// Clears this buffer.  The position is set to zero, the limit is set to
+        /// the capacity, and the mark is discarded.
+        /// 
+        /// <para>
+        /// Invoke this method before using a sequence of channel-read or
+        /// <c>Put</c> operations to fill this buffer.  For example:
+        /// 
+        /// <code>
+        /// buf.Clear();     // Prepare buffer for reading
+        /// in.Read(buf);    // Read data
+        /// </code>
+        /// </para>
+        /// <para>
+        /// This method does not actually erase the data in the buffer, but it
+        /// is named as if it did because it will most often be used in situations
+        /// in which that might as well be the case.
+        /// </para>
+        /// </summary>
+        /// <returns>This buffer</returns>
+        public Buffer Clear()
+        {
+            position = 0;
+            limit = capacity;
+            mark = -1;
+            return this;
+        }
+
+        /// <summary>
+        /// Flips this buffer.  The limit is set to the current position and then
+        /// the position is set to zero.  If the mark is defined then it is
+        /// discarded.
+        /// 
+        /// <para>
+        /// After a sequence of channel-read or <c>Put</c> operations, invoke
+        /// this method to prepare for a sequence of channel-write or relative
+        /// <c>Get</c> operations.  For example:
+        /// 
+        /// <code>
+        /// buf.Put(magic);    // Prepend header
+        /// in.Read(buf);      // Read data into rest of buffer
+        /// buf.Flip();        // Flip buffer
+        /// out.Write(buf);    // Write header + data to channel
+        /// </code>
+        /// </para>
+        /// <para>
+        /// This method is often used in conjunction with the <see cref="ByteBuffer.Compact()"/>
+        /// method when transferring data from one place to another.
+        /// </para>
+        /// </summary>
+        /// <returns>This buffer</returns>
+        public Buffer Flip()
+        {
+            limit = position;
+            position = 0;
+            mark = -1;
+            return this;
         }
 
-        public virtual int Remaining
+        /// <summary>
+        /// Rewinds this buffer.  The position is set to zero and the mark is
+        /// discarded.
+        /// 
+        /// <para>
+        /// Invoke this method before a sequence of channel-write or <c>Get</c>
+        /// operations, assuming that the limit has already been set
+        /// appropriately.  For example:
+        /// 
+        /// <code>
+        /// out.Write(buf);    // Write remaining data
+        /// buf.Rewind();      // Rewind buffer
+        /// buf.Get(array);    // Copy data into array
+        /// </code>
+        /// </para>
+        /// </summary>
+        /// <returns>This buffer</returns>
+        public Buffer Rewind()
+        {
+            position = 0;
+            mark = -1;
+            return this;
+        }
+
+        /// <summary>
+        /// Returns the number of elements between the current position and the
+        /// limit.
+        /// </summary>
+        public int Remaining
         {
-            get { return _limit - _position; }
+            get { return limit - position; }
         }
 
+        /// <summary>
+        /// Tells whether there are any elements between the current position and
+        /// the limit.
+        /// </summary>
+        public bool HasRemaining
+        {
+            get { return position < limit; }
+        }
+
+        /// <summary>
+        /// Tells whether or not this buffer is read-only.
+        /// </summary>
+        /// <returns>
+        /// <c>true</c> if, and only if, this buffer is read-only
+        /// </returns>
+        public abstract bool IsReadOnly { get; }
+
+        /// <summary>
+        /// Tells whether or not this buffer is backed by an accessible
+        /// array.
+        /// 
+        /// <para>
+        /// If this method returns <c>true</c> then the <see cref="Array"/> 
+        /// and <see cref="ArrayOffset"/> properties may be safely invoked.
+        /// </para>
+        /// </summary>
+        /// <returns>
+        /// <c>true</c> if, and only if, this buffer is backed by an array and is not read-only
+        /// </returns>
         public abstract bool HasArray { get; }
 
+        /// <summary>
+        /// Returns the array that backs this
+        /// buffer&nbsp;&nbsp;<i>(optional operation)</i>.
+        /// 
+        /// <para>
+        /// This property is intended to allow array-backed buffers to be
+        /// passed to native code more efficiently. Concrete subclasses
+        /// provide more strongly-typed return values for this property.
+        /// </para>
+        /// <para>
+        /// Modifications to this buffer's content will cause the returned
+        /// array's content to be modified, and vice versa.
+        /// </para>
+        /// <para>
+        /// Check the <see cref="HasArray"/> property before using this
+        /// property in order to ensure that this buffer has an accessible backing
+        /// array.
+        /// </para>
+        /// </summary>
+        /// <returns>
+        /// The array that backs this buffer
+        /// </returns>
+        /// <exception cref="ReadOnlyBufferException">If this buffer is backed by an array but is read-only</exception>
+        /// <exception cref="InvalidOperationException">If this buffer is not backed by an accessible array</exception>
+        public abstract object Array { get; }
+
+
+        /// <summary>
+        /// Returns the offset within this buffer's backing array of the first
+        /// element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>.
+        /// 
+        /// <para>
+        /// If this buffer is backed by an array then buffer position <c>p</c>
+        /// corresponds to array index <c>p</c>&nbsp;+&nbsp;<see cref="ArrayOffset"/><c>.
+        /// </para>
+        /// <para>
+        /// Check the <see cref="HasArray"/> property before using this
+        /// property in order to ensure that this buffer has an accessible backing
+        /// array.
+        /// </para>
+        /// </summary>
+        /// <returns>
+        /// The offset within this buffer's array
+        /// of the first element of the buffer
+        /// </returns>
+        /// <exception cref="ReadOnlyBufferException">If this buffer is backed by an array but is read-only</exception>
+        /// <exception cref="InvalidOperationException">If this buffer is not backed by an accessible array</exception>
+        public abstract int ArrayOffset { get; }
+
+        /// <summary>
+        /// Tells whether or not this buffer is <c>direct</c>
+        /// </summary>
+        /// <returns><c>true</c> if, and only if, this buffer is direct</returns>
         public abstract bool IsDirect { get; }
 
-        public abstract bool IsReadOnly { get; }
+        // -- internal members for bounds checking, etc. --
 
-        public virtual bool HasRemaining
+        /// <summary>
+        /// Checks the current position against the limit, throwing a
+        /// <see cref="BufferUnderflowException"/> if it is not smaller than the limit, and then
+        /// increments the position.
+        /// </summary>
+        /// <returns>The current position value, before it is incremented</returns>
+        internal int NextGetIndex()
         {
-            get { return _limit == _position; }
+            if (position >= limit)
+                throw new BufferUnderflowException();
+            return position++;
         }
 
-        public virtual int Mark
+        internal int NextGetIndex(int nb)
         {
-            get { return _mark; }
-            set
-            {
-                _mark = value;
-            }
+            if (limit - position < nb)
+                throw new BufferUnderflowException();
+            int p = position;
+            position += nb;
+            return p;
         }
 
-        public Buffer Reset()
+        /// <summary>
+        /// Checks the current position against the limit, throwing a <see cref="BufferOverflowException"/>
+        /// if it is not smaller than the limit, and then
+        /// increments the position.
+        /// </summary>
+        /// <returns>The current position value, before it is incremented</returns>
+        internal int NextPutIndex()
         {
-            if (_mark >= 0)
-                _position = _mark;
+            if (position >= limit)
+                throw new BufferOverflowException();
+            return position++;
+        }
 
-            return this;
+        internal int NextPutIndex(int nb)
+        {
+            if (limit - position < nb)
+                throw new BufferOverflowException();
+            int p = position;
+            position += nb;
+            return p;
         }
 
-        public Buffer Clear()
+        /// <summary>
+        /// Checks the given index against the limit, throwing an <see cref="IndexOutOfRangeException"/> 
+        /// if it is not smaller than the limit or is smaller than zero.
+        /// </summary>
+        /// <param name="i"></param>
+        /// <returns></returns>
+        internal int CheckIndex(int i)
         {
-            _position = 0;
-            _limit = _capacity;
-            _mark = -1;
-            return this;
+            if ((i < 0) || (i >= limit))
+                throw new IndexOutOfRangeException();
+            return i;
         }
 
-        public Buffer Flip()
+        internal int CheckIndex(int i, int nb)
         {
-            _limit = _position;
-            _position = 0;
-            if (_mark >= 0)
-                _mark = -1;
+            if ((i < 0) || (nb > limit - i))
+                throw new IndexOutOfRangeException();
+            return i;
+        }
 
-            return this;
+        internal int MarkValue
+        {
+            get { return mark; }
         }
 
-        public Buffer Rewind()
+        internal void Truncate()
         {
-            _position = 0;
-            _mark = -1;
+            mark = -1;
+            position = 0;
+            limit = 0;
+            capacity = 0;
+        }
 
-            return this;
+        internal void DiscardMark()
+        {
+            mark = -1;
+        }
+
+        internal static void CheckBounds(int off, int len, int size)
+        {
+            if ((off | len | (off + len) | (size - (off + len))) < 0)
+                throw new IndexOutOfRangeException();
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Support/BufferExceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/BufferExceptions.cs b/src/Lucene.Net.Core/Support/BufferExceptions.cs
new file mode 100644
index 0000000..c9307aa
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/BufferExceptions.cs
@@ -0,0 +1,24 @@
+\ufeffusing System;
+
+namespace Lucene.Net.Support
+{
+    [Serializable]
+    internal sealed class BufferUnderflowException : Exception
+    {
+    }
+
+    [Serializable]
+    internal sealed class BufferOverflowException : Exception
+    {
+    }
+
+    [Serializable]
+    internal sealed class ReadOnlyBufferException : Exception
+    {
+    }
+
+    [Serializable]
+    internal sealed class InvalidMarkException : Exception
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Support/BufferUnderflowException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/BufferUnderflowException.cs b/src/Lucene.Net.Core/Support/BufferUnderflowException.cs
deleted file mode 100644
index bd86a98..0000000
--- a/src/Lucene.Net.Core/Support/BufferUnderflowException.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-\ufeffusing System;
-
-namespace Lucene.Net.Support
-{
-    internal sealed class BufferUnderflowException : Exception
-    {
-    }
-}
\ No newline at end of file


[23/50] [abbrv] lucenenet git commit: Ported the tests for ByteBuffer from Java and refactored ByteBuffer. Also ported LongBuffer + tests (required by Core.Util.TestPackedInts.TestEncodeDecode()).

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Tests/core/Support/BaseBufferTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/BaseBufferTestCase.cs b/src/Lucene.Net.Tests/core/Support/BaseBufferTestCase.cs
new file mode 100644
index 0000000..1e38fe0
--- /dev/null
+++ b/src/Lucene.Net.Tests/core/Support/BaseBufferTestCase.cs
@@ -0,0 +1,130 @@
+\ufeffusing Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Globalization;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Base class for tests from JDK/nio/Basic.java
+    /// </summary>
+    public class BaseBufferTestCase : LuceneTestCase
+    {
+        internal static TextWriter output = VERBOSE ? Console.Out : new NullWriter();
+
+        internal static long Ic(int i)
+        {
+            int j = i % 54;
+            return j + 'a' + ((j > 26) ? 128 : 0);
+        }
+
+        internal static string ToString(Lucene.Net.Support.Buffer b)
+        {
+            return (b.GetType().Name
+                    + "[pos=" + b.Position
+                    + " lim=" + b.Limit
+                    + " cap=" + b.Capacity
+                    + "]");
+        }
+
+        internal static void Show(int level, Lucene.Net.Support.Buffer b)
+        {
+            for (int i = 0; i < level; i++)
+                output.Write("  ");
+            output.WriteLine(ToString(b) + " " + b.GetHashCode().ToString("x4", CultureInfo.InvariantCulture));
+        }
+
+        //static void fail(string s)
+        //{
+        //    Assert.Fail(s);
+        //}
+
+        internal static void fail(string s, Lucene.Net.Support.Buffer b)
+        {
+            fail(s + ": " + ToString(b));
+        }
+
+        internal static void fail(String s, Lucene.Net.Support.Buffer b, Lucene.Net.Support.Buffer b2)
+        {
+            fail(s + ": "
+                                       + ToString(b) + ", " + ToString(b2));
+        }
+
+        internal static void fail(Lucene.Net.Support.Buffer b,
+                         string expected, char expectedChar,
+                         string got, char gotChar)
+        {
+            if (b is ByteBuffer) {
+                ByteBuffer bb = (ByteBuffer)b;
+                int n = Math.Min(16, bb.Limit);
+                for (int i = 0; i < n; i++)
+                output.Write(" " + (bb.Get(i) & 0xff).ToString("x4", CultureInfo.InvariantCulture));
+            output.WriteLine();
+            }
+            //if (b is CharBuffer) {
+            //    CharBuffer bb = (CharBuffer)b;
+            //    int n = Math.Min(16, bb.Limit);
+            //    for (int i = 0; i < n; i++)
+            //        output.Write(" " + (bb.get(i) & 0xffff).ToString("x4", CultureInfo.InvariantCulture));
+            //    output.WriteLine();
+            //}
+            Assert.Fail(ToString(b)
+                                       + ": Expected '" + expectedChar + "'=0x"
+                                       + expected
+                                       + ", got '" + gotChar + "'=0x"
+                                       + got);
+        }
+
+        internal static void fail(Lucene.Net.Support.Buffer b, long expected, long got)
+        {
+            fail(b,
+                 (expected).ToString("x4", CultureInfo.InvariantCulture), (char)expected,
+                 (got).ToString("x4", CultureInfo.InvariantCulture), (char)got);
+        }
+
+        internal static void ck(Lucene.Net.Support.Buffer b, bool cond)
+        {
+            if (!cond)
+                fail("Condition failed", b);
+        }
+
+        internal static void ck(Lucene.Net.Support.Buffer b, long got, long expected)
+        {
+            if (expected != got)
+                fail(b, expected, got);
+        }
+
+        internal static void ck(Lucene.Net.Support.Buffer b, float got, float expected)
+        {
+            if (expected != got)
+                fail(b,
+                     expected.ToString("0.0##########", CultureInfo.InvariantCulture), (char)expected,
+                     got.ToString("0.0##########", CultureInfo.InvariantCulture), (char)got);
+        }
+
+        internal static void ck(Lucene.Net.Support.Buffer b, double got, double expected)
+        {
+            if (expected != got)
+                fail(b,
+                     expected.ToString("0.0##########", CultureInfo.InvariantCulture), (char)expected,
+                     got.ToString("0.0##########", CultureInfo.InvariantCulture), (char)got);
+        }
+
+        /// <summary>
+        /// A simple writer that implements the null object pattern
+        /// that we can swap in when verbosity is turned off.
+        /// </summary>
+        private class NullWriter : TextWriter
+        {
+            public override Encoding Encoding
+            {
+                get
+                {
+                    return Encoding.UTF8;
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Tests/core/Support/TestByteBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/TestByteBuffer.cs b/src/Lucene.Net.Tests/core/Support/TestByteBuffer.cs
new file mode 100644
index 0000000..3a0855d
--- /dev/null
+++ b/src/Lucene.Net.Tests/core/Support/TestByteBuffer.cs
@@ -0,0 +1,739 @@
+\ufeffusing Lucene.Net.Attributes;
+using NUnit.Framework;
+using System;
+using System.Reflection;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Tests from JDK/nio/BasicByte.java
+    /// </summary>
+    [TestFixture]
+    public class TestByteBuffer : BaseBufferTestCase
+    {
+        private static readonly sbyte[] VALUES = {
+            sbyte.MinValue,
+            (sbyte) -1,
+            (sbyte) 0,
+            (sbyte) 1,
+            sbyte.MaxValue,
+        };
+
+
+        private static void relGet(ByteBuffer b)
+        {
+            int n = b.Capacity;
+            byte v;
+            for (int i = 0; i < n; i++)
+                ck(b, (long)b.Get(), (long)((byte)Ic(i)));
+            b.Rewind();
+        }
+
+        private static void relGet(ByteBuffer b, int start)
+        {
+            int n = b.Remaining;
+            byte v;
+            for (int i = start; i < n; i++)
+                ck(b, (long)b.Get(), (long)((byte)Ic(i)));
+            b.Rewind();
+        }
+
+        private static void absGet(ByteBuffer b)
+        {
+            int n = b.Capacity;
+            byte v;
+            for (int i = 0; i < n; i++)
+                ck(b, (long)b.Get(), (long)((byte)Ic(i)));
+            b.Rewind();
+        }
+
+        private static void bulkGet(ByteBuffer b)
+        {
+            int n = b.Capacity;
+            byte[] a = new byte[n + 7];
+            b.Get(a, 7, n);
+            for (int i = 0; i < n; i++)
+                ck(b, (long)a[i + 7], (long)((byte)Ic(i)));
+        }
+
+        private static void relPut(ByteBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            for (int i = 0; i < n; i++)
+                b.Put((byte)Ic(i));
+            b.Flip();
+        }
+
+        private static void absPut(ByteBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            for (int i = 0; i < n; i++)
+                b.Put(i, (byte)Ic(i));
+            b.Limit = (n);
+            b.Position = (0);
+        }
+
+        private static void bulkPutArray(ByteBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            byte[] a = new byte[n + 7];
+            for (int i = 0; i < n; i++)
+                a[i + 7] = (byte)Ic(i);
+            b.Put(a, 7, n);
+            b.Flip();
+        }
+
+        private static void bulkPutBuffer(ByteBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            ByteBuffer c = ByteBuffer.Allocate(n + 7);
+            c.Position = (7);
+            for (int i = 0; i < n; i++)
+                c.Put((byte)Ic(i));
+            c.Flip();
+            c.Position = (7);
+            b.Put(c);
+            b.Flip();
+        }
+
+        //6231529
+        private static void callReset(ByteBuffer b)
+        {
+            b.Position = (0);
+            b.Mark();
+
+            b.Duplicate().Reset();
+            // LUCENENET: AsReadOnlyBuffer() not implemented
+            //b.AsReadOnlyBuffer().Reset();
+        }
+
+        private static void checkSlice(ByteBuffer b, ByteBuffer slice)
+        {
+            ck(slice, 0, slice.Position);
+            ck(slice, b.Remaining, slice.Limit);
+            ck(slice, b.Remaining, slice.Capacity);
+            if (b.IsDirect != slice.IsDirect)
+                fail("Lost direction", slice);
+            if (b.IsReadOnly != slice.IsReadOnly)
+                fail("Lost read-only", slice);
+        }
+
+        private static void checkBytes(ByteBuffer b, byte[] bs)
+        {
+            int n = bs.Length;
+            int p = b.Position;
+            byte v;
+            if (b.Order == ByteOrder.BIG_ENDIAN)
+            {
+                for (int i = 0; i < n; i++)
+                ck(b, b.Get(), bs[i]);
+            }
+            else
+            {
+                for (int i = n - 1; i >= 0; i--)
+                    ck(b, b.Get(), bs[i]);
+            }
+            b.Position = (p);
+        }
+
+        private static void compact(Buffer b)
+        {
+            try
+            {
+                Type cl = b.GetType();
+                MethodInfo m = cl.GetMethod("Compact", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
+                m.Invoke(b, new object[0]);
+            }
+            catch (Exception e)
+            {
+                fail(e.ToString(), b);
+            }
+        }
+
+        private static void checkInvalidMarkException(Buffer b)
+        {
+            tryCatch(b, typeof(InvalidMarkException), () =>
+                {
+                    b.Mark();
+                    compact(b);
+                    b.Reset();
+                });
+        }
+
+        private static void testViews(int level, ByteBuffer b, bool direct)
+        {
+            //ShortBuffer sb = b.asShortBuffer();
+            //BasicShort.test(level, sb, direct);
+            //checkBytes(b, new byte[] { 0, (byte)ic(0) });
+            //checkInvalidMarkException(sb);
+
+            //CharBuffer cb = b.asCharBuffer();
+            //BasicChar.test(level, cb, direct);
+            //checkBytes(b, new byte[] { 0, (byte)ic(0) });
+            //checkInvalidMarkException(cb);
+
+            //IntBuffer ib = b.asIntBuffer();
+            //BasicInt.test(level, ib, direct);
+            //checkBytes(b, new byte[] { 0, 0, 0, (byte)ic(0) });
+            //checkInvalidMarkException(ib);
+
+            LongBuffer lb = b.AsLongBuffer();
+            TestLongBuffer.test(level, lb, direct);
+            checkBytes(b, new byte[] { 0, 0, 0, 0, 0, 0, 0, (byte)Ic(0) });
+            checkInvalidMarkException(lb);
+
+            //FloatBuffer fb = b.asFloatBuffer();
+            //BasicFloat.test(level, fb, direct);
+            //checkBytes(b, new byte[] { 0x42, (byte)0xc2, 0, 0 });
+            //checkInvalidMarkException(fb);
+
+            //DoubleBuffer db = b.asDoubleBuffer();
+            //BasicDouble.test(level, db, direct);
+            //checkBytes(b, new byte[] { 0x40, 0x58, 0x40, 0, 0, 0, 0, 0 });
+            //checkInvalidMarkException(db);
+        }
+
+        private static void testHet(int level, ByteBuffer b)
+        {
+
+            int p = b.Position;
+            b.Limit = (b.Capacity);
+            Show(level, b);
+            output.Write("    put:");
+
+            b.PutChar((char)1);
+            b.PutChar((char)char.MaxValue);
+            output.Write(" char");
+
+            b.PutShort((short)1);
+            b.PutShort((short)short.MaxValue);
+            output.Write(" short");
+
+            b.PutInt(1);
+            b.PutInt(int.MaxValue);
+            output.Write(" int");
+
+            b.PutLong((long)1);
+            b.PutLong((long)long.MaxValue);
+            output.Write(" long");
+
+            b.PutFloat((float)1);
+            b.PutFloat((float)float.MinValue);
+            b.PutFloat((float)float.MaxValue);
+            output.Write(" float");
+
+            b.PutDouble((double)1);
+            b.PutDouble((double)double.MinValue);
+            b.PutDouble((double)double.MaxValue);
+            output.Write(" double");
+
+            output.WriteLine();
+            b.Limit = (b.Position);
+            b.Position = (p);
+            Show(level, b);
+            output.Write("    get:");
+
+            ck(b, b.GetChar(), 1);
+            ck(b, b.GetChar(), char.MaxValue);
+            output.Write(" char");
+
+            ck(b, b.GetShort(), 1);
+            ck(b, b.GetShort(), short.MaxValue);
+            output.Write(" short");
+
+            ck(b, b.GetInt(), 1);
+            ck(b, b.GetInt(), int.MaxValue);
+            output.Write(" int");
+
+            ck(b, b.GetLong(), 1);
+            ck(b, b.GetLong(), long.MaxValue);
+            output.Write(" long");
+
+            ck(b, (long)b.GetFloat(), 1);
+            ck(b, (long)b.GetFloat(), unchecked((long)float.MinValue));
+            ck(b, (long)b.GetFloat(), unchecked((long)float.MaxValue));
+            output.Write(" float");
+
+            ck(b, (long)b.GetDouble(), 1);
+            ck(b, (long)b.GetDouble(), unchecked((long)double.MinValue));
+            ck(b, (long)b.GetDouble(), unchecked((long)double.MaxValue));
+            output.Write(" double");
+
+            output.WriteLine();
+        }
+
+        private static void fail(string problem,
+                                 ByteBuffer xb, ByteBuffer yb,
+                                 byte x, byte y)
+        {
+            fail(problem + string.Format(": x={0} y={1}", x, y), xb, yb);
+        }
+
+        private static void tryCatch(Buffer b, Type ex, Action thunk)
+        {
+            bool caught = false;
+            try
+            {
+                thunk();
+            }
+            catch (Exception x)
+            {
+                if (ex.IsAssignableFrom(x.GetType()))
+                {
+                    caught = true;
+                }
+                else
+                {
+                    fail(x.Message + " not expected");
+                }
+            }
+            if (!caught)
+                fail(ex.Name + " not thrown", b);
+        }
+
+        private static void tryCatch(byte[] t, Type ex, Action thunk)
+        {
+            tryCatch(ByteBuffer.Wrap(t), ex, thunk);
+        }
+
+        public static void test(int level, ByteBuffer b, bool direct)
+        {
+            Show(level, b);
+
+            if (direct != b.IsDirect)
+                fail("Wrong direction", b);
+
+            // Gets and puts
+
+            relPut(b);
+            relGet(b);
+            absGet(b);
+            bulkGet(b);
+
+            absPut(b);
+            relGet(b);
+            absGet(b);
+            bulkGet(b);
+
+            bulkPutArray(b);
+            relGet(b);
+
+            bulkPutBuffer(b);
+            relGet(b);
+
+
+            // Compact
+
+            relPut(b);
+            b.Position = (13);
+            b.Compact();
+            b.Flip();
+            relGet(b, 13);
+
+            // Exceptions
+
+            relPut(b);
+            b.Limit = (b.Capacity / 2);
+            b.Position = (b.Limit);
+
+            tryCatch(b, typeof(BufferUnderflowException), () =>
+            {
+                b.Get();
+            });
+
+            tryCatch(b, typeof(BufferOverflowException), () =>
+            {
+                b.Put((byte)42);
+            });
+
+            // The index must be non-negative and lesss than the buffer's limit.
+            tryCatch(b, typeof(IndexOutOfRangeException), () =>
+            {
+                b.Get(b.Limit);
+            });
+            tryCatch(b, typeof(IndexOutOfRangeException), () =>
+            {
+                b.Get(-1);
+            });
+
+            tryCatch(b, typeof(IndexOutOfRangeException), () =>
+            {
+                b.Put(b.Limit, (byte)42);
+            });
+
+            tryCatch(b, typeof(InvalidMarkException), () =>
+            {
+                b.Position = (0);
+                b.Mark();
+                b.Compact();
+                b.Reset();
+            });
+
+            // Values
+
+            b.Clear();
+            b.Put((byte)0);
+            b.Put(unchecked((byte)-1));
+            b.Put((byte)1);
+            b.Put(unchecked((byte)sbyte.MaxValue));
+            b.Put(unchecked((byte)sbyte.MinValue));
+
+            byte v;
+            b.Flip();
+            ck(b, b.Get(), 0);
+            ck(b, b.Get(), unchecked((byte)-1));
+            ck(b, b.Get(), 1);
+            ck(b, b.Get(), unchecked((byte)sbyte.MaxValue));
+            ck(b, b.Get(), unchecked((byte)sbyte.MinValue));
+
+
+            // Comparison
+            b.Rewind();
+            ByteBuffer b2 = Lucene.Net.Support.ByteBuffer.Allocate(b.Capacity);
+            b2.Put(b);
+            b2.Flip();
+            b.Position = (2);
+            b2.Position = (2);
+            if (!b.Equals(b2))
+            {
+                for (int i = 2; i < b.Limit; i++)
+                {
+                    byte x = b.Get(i);
+                    byte y = b2.Get(i);
+                    if (x != y)
+                        output.WriteLine("[" + i + "] " + x + " != " + y);
+                }
+                fail("Identical buffers not equal", b, b2);
+            }
+            if (b.CompareTo(b2) != 0)
+                fail("Comparison to identical buffer != 0", b, b2);
+
+            b.Limit = (b.Limit + 1);
+            b.Position = (b.Limit - 1);
+            b.Put((byte)99);
+            b.Rewind();
+            b2.Rewind();
+            if (b.Equals(b2))
+                fail("Non-identical buffers equal", b, b2);
+            if (b.CompareTo(b2) <= 0)
+                fail("Comparison to shorter buffer <= 0", b, b2);
+            b.Limit = (b.Limit - 1);
+
+            b.Put(2, (byte)42);
+            if (b.equals(b2))
+                fail("Non-identical buffers equal", b, b2);
+            if (b.CompareTo(b2) <= 0)
+                fail("Comparison to lesser buffer <= 0", b, b2);
+
+            // Check equals and compareTo with interesting values
+            foreach (byte x in VALUES)
+            {
+                ByteBuffer xb = Lucene.Net.Support.ByteBuffer.Wrap(new byte[] { x });
+                if (xb.CompareTo(xb) != 0)
+                {
+                    fail("compareTo not reflexive", xb, xb, x, x);
+                }
+                if (!xb.Equals(xb))
+                {
+                    fail("equals not reflexive", xb, xb, x, x);
+                }
+                foreach (byte y in VALUES)
+                {
+                    ByteBuffer yb = Lucene.Net.Support.ByteBuffer.Wrap(new byte[] { y });
+                    if (xb.CompareTo(yb) != -yb.CompareTo(xb))
+                    {
+                        fail("compareTo not anti-symmetric",
+                             xb, yb, x, y);
+                    }
+                    if ((xb.CompareTo(yb) == 0) != xb.Equals(yb))
+                    {
+                        fail("compareTo inconsistent with equals",
+                             xb, yb, x, y);
+                    }
+                    // from Byte.compare(x, y)
+                    //return x - y;
+                    if (xb.CompareTo(yb) != (x - y) /* Byte.Compare(x, y)*/)
+                    {
+                        fail("Incorrect results for ByteBuffer.compareTo",
+                             xb, yb, x, y);
+                    }
+                    if (xb.equals(yb) != ((x == y) || ((x != x) && (y != y))))
+                    {
+                        fail("Incorrect results for ByteBuffer.equals",
+                             xb, yb, x, y);
+                    }
+                }
+            }
+
+            // Sub, dup
+
+            relPut(b);
+            relGet(b.Duplicate());
+            b.Position = (13);
+            relGet(b.Duplicate(), 13);
+            relGet(b.Duplicate().Slice(), 13);
+            relGet(b.Slice(), 13);
+            relGet(b.Slice().Duplicate(), 13);
+
+            // Slice
+
+            b.Position = (5);
+            ByteBuffer sb = b.Slice();
+            checkSlice(b, sb);
+            b.Position = (0);
+            ByteBuffer sb2 = sb.Slice();
+            checkSlice(sb, sb2);
+
+            if (!sb.Equals(sb2))
+                fail("Sliced slices do not match", sb, sb2);
+            if ((sb.HasArray) && (sb.ArrayOffset != sb2.ArrayOffset))
+                fail("Array offsets do not match: "
+                     + sb.ArrayOffset + " != " + sb2.ArrayOffset, sb, sb2);
+
+            // Views
+
+            b.Clear();
+            b.Order = (ByteOrder.BIG_ENDIAN);
+            testViews(level + 1, b, direct);
+
+            for (int i = 1; i <= 9; i++)
+            {
+                b.Position = (i);
+                Show(level + 1, b);
+                testViews(level + 2, b, direct);
+            }
+
+            b.Position=(0);
+            b.Order=(ByteOrder.LITTLE_ENDIAN);
+            testViews(level + 1, b, direct);
+
+            // Heterogeneous accessors
+
+            b.Order = (ByteOrder.BIG_ENDIAN);
+            for (int i = 0; i <= 9; i++)
+            {
+                b.Position = (i);
+                testHet(level + 1, b);
+            }
+            b.Order = (ByteOrder.LITTLE_ENDIAN);
+            b.Position = (3);
+            testHet(level + 1, b);
+
+            // Read-only views
+
+            b.Rewind();
+            ByteBuffer rb = b.AsReadOnlyBuffer();
+            if (!b.equals(rb))
+                fail("Buffer not equal to read-only view", b, rb);
+            Show(level + 1, rb);
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                relPut(rb);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                absPut(rb);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                bulkPutArray(rb);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                bulkPutBuffer(rb);
+            });
+
+            // put(ByteBuffer) should not change source position
+            ByteBuffer src = ByteBuffer.Allocate(1);
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.Put(src);
+            });
+            ck(src, src.Position, 0);
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.Compact();
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutChar((char)1);
+            });
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutChar(0, (char)1);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutShort((short)1);
+            });
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutShort(0, (short)1);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutInt(1);
+            });
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutInt(0, 1);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutLong((long)1);
+            });
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutLong(0, (long)1);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutFloat((float)1);
+            });
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutFloat(0, (float)1);
+            });
+
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutDouble((double)1);
+            });
+            tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            {
+                rb.PutDouble(0, (double)1);
+            });
+
+
+            if (rb.GetType().Name.StartsWith("java.nio.Heap"))
+            {
+
+                tryCatch(b, typeof(ReadOnlyBufferException), () =>
+                {
+                    var x = rb.Array;
+                });
+
+                tryCatch(b, typeof(ReadOnlyBufferException), () =>
+                {
+                    var x = rb.ArrayOffset;
+                });
+
+                if (rb.HasArray)
+                    fail("Read-only heap buffer's backing array is accessible",
+                         rb);
+
+            }
+
+            // Bulk puts from read-only buffers
+
+            b.Clear();
+            rb.Rewind();
+            b.Put(rb);
+
+            // LUCENENET: AllocateDirect not implemented
+
+            // For byte buffers, test both the direct and non-direct cases
+            //ByteBuffer ob
+            //    = (b.IsDirect
+            //       ? ByteBuffer.Allocate(rb.Capacity)
+            //       : ByteBuffer.AllocateDirect(rb.Capacity));
+            ByteBuffer ob = ByteBuffer.Allocate(rb.Capacity);
+            rb.Rewind();
+            ob.Put(rb);
+
+
+            relPut(b);                       // Required by testViews
+        }
+
+        public static void test(byte[] ba)
+        {
+            int offset = 47;
+            int length = 900;
+            ByteBuffer b = ByteBuffer.Wrap(ba, offset, length);
+            Show(0, b);
+            ck(b, b.Capacity, ba.Length);
+            ck(b, b.Position, offset);
+            ck(b, b.Limit, offset + length);
+
+            // The offset must be non-negative and no larger than <array.length>.
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                ByteBuffer.Wrap(ba, -1, ba.Length);
+            });
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                ByteBuffer.Wrap(ba, ba.Length + 1, ba.Length);
+            });
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                ByteBuffer.Wrap(ba, 0, -1);
+            });
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                ByteBuffer.Wrap(ba, 0, ba.Length + 1);
+            });
+
+            // A NullPointerException will be thrown if the array is null.
+            tryCatch(ba, typeof(NullReferenceException), () =>
+            {
+                ByteBuffer.Wrap((byte[])null, 0, 5);
+            });
+            tryCatch(ba, typeof(NullReferenceException), () =>
+            {
+                ByteBuffer.Wrap((byte[])null);
+            });
+        }
+
+        private static void testAllocate()
+        {
+            // An IllegalArgumentException will be thrown for negative capacities.
+            tryCatch((Buffer)null, typeof(ArgumentException), () =>
+            {
+                ByteBuffer.Allocate(-1);
+            });
+
+            // LUCENENET: AllocateDirect not implemented
+            //tryCatch((Buffer)null, typeof(ArgumentException), () =>
+            //{
+            //    ByteBuffer.AllocateDirect(-1);
+            //});
+
+            // LUCENENET: AllocateDirect not implemented
+            tryCatch((Buffer)null, typeof(NotImplementedException), () =>
+            {
+                ByteBuffer.AllocateDirect(-1);
+            });
+        }
+
+        [Test, LuceneNetSpecific]
+        public static void Test()
+        {
+            testAllocate();
+            test(0, ByteBuffer.Allocate(7 * 1024), false);
+            test(0, ByteBuffer.Wrap(new byte[7 * 1024], 0, 7 * 1024), false);
+            test(new byte[1024]);
+
+            // LUCENENET: AllocateDirect not implemented
+            //ByteBuffer b = ByteBuffer.AllocateDirect(7 * 1024);
+            //for (b.Position = (0); b.Position < b.Limit;)
+            //    ck(b, b.Get(), 0);
+            //test(0, b, true);
+
+            callReset(ByteBuffer.Allocate(10));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Tests/core/Support/TestLongBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/TestLongBuffer.cs b/src/Lucene.Net.Tests/core/Support/TestLongBuffer.cs
new file mode 100644
index 0000000..3b9cb7d
--- /dev/null
+++ b/src/Lucene.Net.Tests/core/Support/TestLongBuffer.cs
@@ -0,0 +1,522 @@
+\ufeffusing Lucene.Net.Attributes;
+using NUnit.Framework;
+using System;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Tests from JDK/nio/BasicLong.java
+    /// </summary>
+    public class TestLongBuffer : BaseBufferTestCase
+    {
+        private static readonly long[] VALUES = {
+            long.MinValue,
+            (long) -1,
+            (long) 0,
+            (long) 1,
+            long.MaxValue,
+        };
+
+
+        private static void relGet(LongBuffer b)
+        {
+            int n = b.Capacity;
+            long v;
+            for (int i = 0; i < n; i++)
+                ck(b, (long)b.Get(), (long)((long)Ic(i)));
+            b.Rewind();
+        }
+
+        private static void relGet(LongBuffer b, int start)
+        {
+            int n = b.Remaining;
+            long v;
+            for (int i = start; i < n; i++)
+                ck(b, (long)b.Get(), (long)((long)Ic(i)));
+            b.Rewind();
+        }
+
+        private static void absGet(LongBuffer b)
+        {
+            int n = b.Capacity;
+            long v;
+            for (int i = 0; i < n; i++)
+                ck(b, (long)b.Get(), (long)((long)Ic(i)));
+            b.Rewind();
+        }
+
+        private static void bulkGet(LongBuffer b)
+        {
+            int n = b.Capacity;
+            long[] a = new long[n + 7];
+            b.Get(a, 7, n);
+            for (int i = 0; i < n; i++)
+                ck(b, (long)a[i + 7], (long)((long)Ic(i)));
+        }
+
+        private static void relPut(LongBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            for (int i = 0; i < n; i++)
+                b.Put((long)Ic(i));
+            b.Flip();
+        }
+
+        private static void absPut(LongBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            for (int i = 0; i < n; i++)
+                b.Put(i, (long)Ic(i));
+            b.Limit = (n);
+            b.Position = (0);
+        }
+
+        private static void bulkPutArray(LongBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            long[] a = new long[n + 7];
+            for (int i = 0; i < n; i++)
+                a[i + 7] = (long)Ic(i);
+            b.Put(a, 7, n);
+            b.Flip();
+        }
+
+        private static void bulkPutBuffer(LongBuffer b)
+        {
+            int n = b.Capacity;
+            b.Clear();
+            LongBuffer c = LongBuffer.Allocate(n + 7);
+            c.Position = (7);
+            for (int i = 0; i < n; i++)
+                c.Put((long)Ic(i));
+            c.Flip();
+            c.Position = (7);
+            b.Put(c);
+            b.Flip();
+        }
+
+        //6231529
+        private static void callReset(LongBuffer b)
+        {
+            b.Position = (0);
+            b.Mark();
+
+            b.Duplicate().Reset();
+
+            // LUCENENET: AsReadOnlyBuffer() not implemented
+            //b.AsReadOnlyBuffer().Reset();
+        }
+
+
+
+        // 6221101-6234263
+
+        private static void putBuffer()
+        {
+            int cap = 10;
+
+            // LUCENENET: AllocateDirect not implemented
+
+            //LongBuffer direct1 = ByteBuffer.AllocateDirect(cap).AsLongBuffer();
+            LongBuffer nondirect1 = ByteBuffer.Allocate(cap).AsLongBuffer();
+            //direct1.Put(nondirect1);
+
+            //LongBuffer direct2 = ByteBuffer.AllocateDirect(cap).AsLongBuffer();
+            LongBuffer nondirect2 = ByteBuffer.Allocate(cap).AsLongBuffer();
+            //nondirect2.Put(direct2);
+
+            //LongBuffer direct3 = ByteBuffer.AllocateDirect(cap).AsLongBuffer();
+            //LongBuffer direct4 = ByteBuffer.AllocateDirect(cap).AsLongBuffer();
+            //direct3.Put(direct4);
+
+            LongBuffer nondirect3 = ByteBuffer.Allocate(cap).AsLongBuffer();
+            LongBuffer nondirect4 = ByteBuffer.Allocate(cap).AsLongBuffer();
+            nondirect3.Put(nondirect4);
+        }
+
+        private static void checkSlice(LongBuffer b, LongBuffer slice)
+        {
+            ck(slice, 0, slice.Position);
+            ck(slice, b.Remaining, slice.Limit);
+            ck(slice, b.Remaining, slice.Capacity);
+            if (b.IsDirect != slice.IsDirect)
+                fail("Lost direction", slice);
+            if (b.IsReadOnly != slice.IsReadOnly)
+                fail("Lost read-only", slice);
+        }
+
+        private static void fail(string problem,
+                                 LongBuffer xb, LongBuffer yb,
+                                 long x, long y)
+        {
+            fail(problem + string.Format(": x={0} y={1}", x, y), xb, yb);
+        }
+
+        private static void tryCatch(Buffer b, Type ex, Action thunk)
+        {
+            bool caught = false;
+            try
+            {
+                thunk();
+            }
+            catch (Exception x)
+            {
+                if (ex.IsAssignableFrom(x.GetType()))
+                {
+                    caught = true;
+                }
+                else
+                {
+                    fail(x.Message + " not expected");
+                }
+            }
+            if (!caught)
+                fail(ex.Name + " not thrown", b);
+        }
+
+        private static void tryCatch(long[] t, Type ex, Action thunk)
+        {
+            tryCatch(LongBuffer.Wrap(t), ex, thunk);
+        }
+
+        public static void test(int level, LongBuffer b, bool direct)
+        {
+
+            Show(level, b);
+
+            if (direct != b.IsDirect)
+                fail("Wrong direction", b);
+
+            // Gets and puts
+
+            relPut(b);
+            relGet(b);
+            absGet(b);
+            bulkGet(b);
+
+            absPut(b);
+            relGet(b);
+            absGet(b);
+            bulkGet(b);
+
+            bulkPutArray(b);
+            relGet(b);
+
+            bulkPutBuffer(b);
+            relGet(b);
+
+            // Compact
+
+            relPut(b);
+            b.Position = (13);
+            b.Compact();
+            b.Flip();
+            relGet(b, 13);
+
+            // Exceptions
+
+            relPut(b);
+            b.Limit = (b.Capacity / 2);
+            b.Position = (b.Limit);
+
+            tryCatch(b, typeof(BufferUnderflowException), () =>
+            {
+                b.Get();
+            });
+
+            tryCatch(b, typeof(BufferOverflowException), () =>
+            {
+                b.Put((long)42);
+            });
+
+            // The index must be non-negative and lesss than the buffer's limit.
+            tryCatch(b, typeof(IndexOutOfRangeException), () =>
+            {
+                b.Get(b.Limit);
+            });
+            tryCatch(b, typeof(IndexOutOfRangeException), () =>
+            {
+                b.Get(-1);
+            });
+
+            tryCatch(b, typeof(IndexOutOfRangeException), () =>
+            {
+                b.Put(b.Limit, (long)42);
+            });
+
+            tryCatch(b, typeof(InvalidMarkException), () =>
+            {
+                b.Position = (0);
+                b.Mark();
+                b.Compact();
+                b.Reset();
+            });
+
+            // Values
+
+            b.Clear();
+            b.Put((long)0);
+            b.Put((long)-1);
+            b.Put((long)1);
+            b.Put(long.MaxValue);
+            b.Put(long.MinValue);
+
+            long v;
+            b.Flip();
+            ck(b, b.Get(), 0);
+            ck(b, b.Get(), (long)-1);
+            ck(b, b.Get(), 1);
+            ck(b, b.Get(), long.MaxValue);
+            ck(b, b.Get(), long.MinValue);
+
+
+            // Comparison
+            b.Rewind();
+            LongBuffer b2 = Lucene.Net.Support.LongBuffer.Allocate(b.Capacity);
+            b2.Put(b);
+            b2.Flip();
+            b.Position = (2);
+            b2.Position = (2);
+            if (!b.equals(b2))
+            {
+                for (int i = 2; i < b.Limit; i++)
+                {
+                    long x = b.Get(i);
+                    long y = b2.Get(i);
+                    if (x != y)
+                        output.WriteLine("[" + i + "] " + x + " != " + y);
+                }
+                fail("Identical buffers not equal", b, b2);
+            }
+            if (b.CompareTo(b2) != 0)
+                fail("Comparison to identical buffer != 0", b, b2);
+
+            b.Limit = (b.Limit + 1);
+            b.Position = (b.Limit - 1);
+            b.Put((long)99);
+            b.Rewind();
+            b2.Rewind();
+            if (b.Equals(b2))
+                fail("Non-identical buffers equal", b, b2);
+            if (b.CompareTo(b2) <= 0)
+                fail("Comparison to shorter buffer <= 0", b, b2);
+            b.Limit = (b.Limit - 1);
+
+            b.Put(2, (long)42);
+            if (b.equals(b2))
+                fail("Non-identical buffers equal", b, b2);
+            if (b.CompareTo(b2) <= 0)
+                fail("Comparison to lesser buffer <= 0", b, b2);
+
+            // Check equals and compareTo with interesting values
+            foreach (long x in VALUES)
+            {
+                LongBuffer xb = Lucene.Net.Support.LongBuffer.Wrap(new long[] { x });
+                if (xb.CompareTo(xb) != 0)
+                {
+                    fail("compareTo not reflexive", xb, xb, x, x);
+                }
+                if (!xb.equals(xb))
+                {
+                    fail("equals not reflexive", xb, xb, x, x);
+                }
+                foreach (long y in VALUES)
+                {
+                    LongBuffer yb = Lucene.Net.Support.LongBuffer.Wrap(new long[] { y });
+                    if (xb.CompareTo(yb) != -yb.CompareTo(xb))
+                    {
+                        fail("compareTo not anti-symmetric",
+                             xb, yb, x, y);
+                    }
+                    if ((xb.CompareTo(yb) == 0) != xb.equals(yb))
+                    {
+                        fail("compareTo inconsistent with equals",
+                             xb, yb, x, y);
+                    }
+                    // from Long.compare(x, y)
+                    if (xb.CompareTo(yb) != ((x < y) ? -1 : ((x == y) ? 0 : 1)))
+                    {
+
+                        fail("Incorrect results for LongBuffer.compareTo",
+                             xb, yb, x, y);
+                    }
+                    if (xb.equals(yb) != ((x == y) || (x != x) && (y != y)))
+                    {
+                        fail("Incorrect results for LongBuffer.equals",
+                             xb, yb, x, y);
+                    }
+                }
+            }
+
+            // Sub, dup
+
+            relPut(b);
+            relGet(b.Duplicate());
+            b.Position = (13);
+            relGet(b.Duplicate(), 13);
+            relGet(b.Duplicate().Slice(), 13);
+            relGet(b.Slice(), 13);
+            relGet(b.Slice().Duplicate(), 13);
+
+            // Slice
+
+            b.Position = (5);
+            LongBuffer sb = b.Slice();
+            checkSlice(b, sb);
+            b.Position = (0);
+            LongBuffer sb2 = sb.Slice();
+            checkSlice(sb, sb2);
+
+            if (!sb.equals(sb2))
+                fail("Sliced slices do not match", sb, sb2);
+            if ((sb.HasArray) && (sb.ArrayOffset != sb2.ArrayOffset))
+                fail("Array offsets do not match: "
+                     + sb.ArrayOffset + " != " + sb2.ArrayOffset, sb, sb2);
+
+
+            // Read-only views
+
+            b.Rewind();
+
+            // LUCENENET: AsReadOnlyBuffer() not implemented
+            tryCatch(b, typeof(NotImplementedException), () =>
+            {
+                b.AsReadOnlyBuffer();
+            });
+
+            // LUCENENET: AsReadOnlyBuffer() not implemented
+            //LongBuffer rb = b.AsReadOnlyBuffer();
+            //if (!b.Equals(rb))
+            //    fail("Buffer not equal to read-only view", b, rb);
+            //Show(level + 1, rb);
+
+            //tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //{
+            //    relPut(rb);
+            //});
+
+            //tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //{
+            //    absPut(rb);
+            //});
+
+            //tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //{
+            //    bulkPutArray(rb);
+            //});
+
+            //tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //{
+            //    bulkPutBuffer(rb);
+            //});
+
+            //// put(LongBuffer) should not change source position
+            //LongBuffer src = LongBuffer.Allocate(1);
+            //tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //{
+            //    rb.Put(src);
+            //});
+            //ck(src, src.Position, 0);
+
+            //tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //{
+            //    rb.Compact();
+            //});
+
+
+            //if (rb.GetType().Name.StartsWith("Heap"))
+            //{
+
+            //    tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //    {
+            //        var x = rb.Array;
+            //    });
+
+            //    tryCatch(b, typeof(ReadOnlyBufferException), () =>
+            //    {
+            //        var x = rb.ArrayOffset;
+            //    });
+
+            //    if (rb.HasArray)
+            //        fail("Read-only heap buffer's backing array is accessible",
+            //             rb);
+
+            //}
+
+            // Bulk puts from read-only buffers
+
+            b.Clear();
+            //rb.Rewind();
+            //b.Put(rb);
+
+            relPut(b);                       // Required by testViews
+
+        }
+
+
+        public static void test(long[] ba)
+        {
+            int offset = 47;
+            int length = 900;
+            LongBuffer b = LongBuffer.Wrap(ba, offset, length);
+            Show(0, b);
+            ck(b, b.Capacity, ba.Length);
+            ck(b, b.Position, offset);
+            ck(b, b.Limit, offset + length);
+
+            // The offset must be non-negative and no larger than <array.length>.
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                LongBuffer.Wrap(ba, -1, ba.Length);
+            });
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                LongBuffer.Wrap(ba, ba.Length + 1, ba.Length);
+            });
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                LongBuffer.Wrap(ba, 0, -1);
+            });
+            tryCatch(ba, typeof(ArgumentOutOfRangeException), () =>
+            {
+                LongBuffer.Wrap(ba, 0, ba.Length + 1);
+            });
+
+            // A NullPointerException will be thrown if the array is null.
+            tryCatch(ba, typeof(NullReferenceException), () =>
+            {
+                LongBuffer.Wrap((long[])null, 0, 5);
+            });
+            tryCatch(ba, typeof(NullReferenceException), () =>
+            {
+                LongBuffer.Wrap((long[])null);
+            });
+        }
+
+
+        public static void TestAllocate()
+        {
+            // An IllegalArgumentException will be thrown for negative capacities.
+            tryCatch((Buffer)null, typeof(ArgumentException), () =>
+            {
+                LongBuffer.Allocate(-1);
+            });
+        }
+
+        [Test, LuceneNetSpecific]
+        public static void Test()
+        {
+            TestAllocate();
+            test(0, LongBuffer.Allocate(7 * 1024), false);
+            test(0, LongBuffer.Wrap(new long[7 * 1024], 0, 7 * 1024), false);
+            test(new long[1024]);
+
+            callReset(LongBuffer.Allocate(10));
+            putBuffer();
+
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
index 60b61bb..310de82 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
@@ -982,7 +982,6 @@ namespace Lucene.Net.Util.Packed
         }
 
         [Test]
-        [Ignore("LUCENENET TODO: LongBuffer and the method AsLongBuffer are not yet ported, so we cannot currently run this test without porting or finding an alternative way to compare the data.")]
         public virtual void TestEncodeDecode()
         {
             foreach (PackedInts.Format format in PackedInts.Format.Values())
@@ -1059,38 +1058,35 @@ namespace Lucene.Net.Util.Packed
                         Assert.AreEqual(blocks2, blocks3, msg);
                     }
 
-                    // LUCENENET TODO: LongBuffer and the method AsLongBuffer are not yet ported, so we
-                    // cannot currently run the following tests.
-
-                    //// 4. byte[] decoding
-                    //byte[] byteBlocks = new byte[8 * blocks.Length];
-                    //ByteBuffer.Wrap(byteBlocks).AsLongBuffer().Put(blocks);
-                    //long[] values2 = new long[valuesOffset + longIterations * longValueCount];
-                    //decoder.Decode(byteBlocks, blocksOffset * 8, values2, valuesOffset, byteIterations);
-                    //foreach (long value in values2)
-                    //{
-                    //    Assert.IsTrue(value <= PackedInts.MaxValue(bpv), msg);
-                    //}
-                    //Assert.AreEqual(values, values2, msg);
-                    //// test decoding to int[]
-                    //if (bpv <= 32)
-                    //{
-                    //    int[] intValues2 = new int[values2.Length];
-                    //    decoder.Decode(byteBlocks, blocksOffset * 8, intValues2, valuesOffset, byteIterations);
-                    //    Assert.IsTrue(Equals(intValues2, values2), msg);
-                    //}
-
-                    //// 5. byte[] encoding
-                    //byte[] blocks3_ = new byte[8 * (blocksOffset2 + blocksLen)];
-                    //encoder.Encode(values, valuesOffset, blocks3_, 8 * blocksOffset2, byteIterations);
-                    //assertEquals(msg, LongBuffer.Wrap(blocks2), ByteBuffer.Wrap(blocks3_).AsLongBuffer());
-                    //// test encoding from int[]
-                    //if (bpv <= 32)
-                    //{
-                    //    byte[] blocks4 = new byte[blocks3_.Length];
-                    //    encoder.Encode(intValues, valuesOffset, blocks4, 8 * blocksOffset2, byteIterations);
-                    //    Assert.AreEqual(blocks3_, blocks4, msg);
-                    //}
+                    // 4. byte[] decoding
+                    byte[] byteBlocks = new byte[8 * blocks.Length];
+                    ByteBuffer.Wrap(byteBlocks).AsLongBuffer().Put(blocks);
+                    long[] values2 = new long[valuesOffset + longIterations * longValueCount];
+                    decoder.Decode(byteBlocks, blocksOffset * 8, values2, valuesOffset, byteIterations);
+                    foreach (long value in values2)
+                    {
+                        Assert.IsTrue(value <= PackedInts.MaxValue(bpv), msg);
+                    }
+                    Assert.AreEqual(values, values2, msg);
+                    // test decoding to int[]
+                    if (bpv <= 32)
+                    {
+                        int[] intValues2 = new int[values2.Length];
+                        decoder.Decode(byteBlocks, blocksOffset * 8, intValues2, valuesOffset, byteIterations);
+                        Assert.IsTrue(Equals(intValues2, values2), msg);
+                    }
+
+                    // 5. byte[] encoding
+                    byte[] blocks3_ = new byte[8 * (blocksOffset2 + blocksLen)];
+                    encoder.Encode(values, valuesOffset, blocks3_, 8 * blocksOffset2, byteIterations);
+                    assertEquals(msg, LongBuffer.Wrap(blocks2), ByteBuffer.Wrap(blocks3_).AsLongBuffer());
+                    // test encoding from int[]
+                    if (bpv <= 32)
+                    {
+                        byte[] blocks4 = new byte[blocks3_.Length];
+                        encoder.Encode(intValues, valuesOffset, blocks4, 8 * blocksOffset2, byteIterations);
+                        Assert.AreEqual(blocks3_, blocks4, msg);
+                    }
                 }
             }
         }


[48/50] [abbrv] lucenenet git commit: Ported Analysis.Stempel + tests (closes #190)

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer2.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer2.cs
new file mode 100644
index 0000000..d1b25a6
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer2.cs
@@ -0,0 +1,92 @@
+\ufeff/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The Optimizer class is a Trie that will be reduced (have empty rows removed).
+    /// <para>
+    /// This is the result of allowing a joining of rows when there is no collision
+    /// between non-<c>null</c> values in the rows. Information loss, resulting in
+    /// the stemmer not being able to recognize words (as in Optimizer), is
+    /// curtailed, allowing the stemmer to recognize words for which the original
+    /// trie was built. Use of this class allows the stemmer to be self-teaching.
+    /// </para>
+    /// </summary>
+    public class Optimizer2 : Optimizer
+    {
+        /// <summary>
+        /// Constructor for the <see cref="Optimizer2"/> object.
+        /// </summary>
+        public Optimizer2() { }
+
+        /// <summary>
+        /// Merge the given <see cref="Cell"/>s and return the resulting <see cref="Cell"/>.
+        /// </summary>
+        /// <param name="m">the master <see cref="Cell"/></param>
+        /// <param name="e">the existing <see cref="Cell"/></param>
+        /// <returns>the resulting <see cref="Cell"/>, or <c>null</c> if the operation cannot be realized</returns>
+        public override Cell Merge(Cell m, Cell e)
+        {
+            if (m.cmd == e.cmd && m.@ref == e.@ref && m.skip == e.skip) {
+                Cell c = new Cell(m);
+                c.cnt += e.cnt;
+                return c;
+            } else {
+                return null;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Reduce.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Reduce.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Reduce.cs
new file mode 100644
index 0000000..61a1c3f
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Reduce.cs
@@ -0,0 +1,143 @@
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The <see cref="Reduce"/> object is used to remove gaps in a <see cref="Trie"/> which stores a dictionary.
+    /// </summary>
+    public class Reduce
+    {
+        /// <summary>
+        /// Constructor for the <see cref="Reduce"/> object.
+        /// </summary>
+        public Reduce() { }
+
+        /// <summary>
+        /// Optimize (remove holes in the rows) the given <see cref="Trie"/> and return the
+        /// restructured <see cref="Trie"/>.
+        /// </summary>
+        /// <param name="orig">the <see cref="Trie"/> to optimize</param>
+        /// <returns>the restructured <see cref="Trie"/></returns>
+        public virtual Trie Optimize(Trie orig)
+        {
+            IList<string> cmds = orig.cmds;
+            IList<Row> rows = new List<Row>();
+            IList<Row> orows = orig.rows;
+            int[] remap = new int[orows.Count];
+
+            Arrays.Fill(remap, -1);
+            rows = RemoveGaps(orig.root, rows, new List<Row>(), remap);
+
+            return new Trie(orig.forward, remap[orig.root], cmds, rows);
+        }
+
+        internal virtual IList<Row> RemoveGaps(int ind, IList<Row> old, IList<Row> to, int[] remap)
+        {
+            remap[ind] = to.Count;
+
+            Row now = old[ind];
+            to.Add(now);
+            IEnumerator<Cell> i = now.cells.Values.GetEnumerator();
+            for (; i.MoveNext();)
+            {
+                Cell c = i.Current;
+                if (c.@ref >= 0 && remap[c.@ref] < 0)
+                {
+                    RemoveGaps(c.@ref, old, to, remap);
+                }
+            }
+            to[remap[ind]] = new Remap(now, remap);
+            return to;
+        }
+
+        /// <summary>
+        /// This class is part of the Egothor Project
+        /// </summary>
+        internal class Remap : Row
+        {
+            /**
+             * Constructor for the <see cref="Remap"/> object
+             * 
+             * @param old Description of the Parameter
+             * @param remap Description of the Parameter
+             */
+            public Remap(Row old, int[] remap)
+                        : base()
+            {
+                var i = old.cells.Keys.GetEnumerator();
+                for (; i.MoveNext();)
+                {
+                    char ch = i.Current;
+                    Cell c = old.At(ch);
+                    Cell nc;
+                    if (c.@ref >= 0)
+                    {
+                        nc = new Cell(c);
+                        nc.@ref = remap[nc.@ref];
+                    }
+                    else
+                    {
+                        nc = new Cell(c);
+                    }
+                    cells[ch] = nc;
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs
new file mode 100644
index 0000000..6fdad76
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs
@@ -0,0 +1,342 @@
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
+using System.IO;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The <see cref="Row"/> class represents a row in a matrix representation of a <see cref="Trie"/>.
+    /// </summary>
+    public class Row
+    {
+        // LUCENENET NOTE: This was TreeMap in Java, which allows duplicate keys, but
+        // SortedDictionary does not. If there are issues with Stempel, check this!!
+        internal SortedDictionary<char, Cell> cells = new SortedDictionary<char, Cell>();
+        internal int uniformCnt = 0;
+        internal int uniformSkip = 0;
+
+        /// <summary>
+        /// Construct a <see cref="Row"/> object from input carried in via the given input stream.
+        /// </summary>
+        /// <param name="@is">the input stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public Row(IDataInput @is)
+        {
+            for (int i = @is.ReadInt(); i > 0; i--)
+            {
+                char ch = @is.ReadChar();
+                Cell c = new Cell();
+                c.cmd = @is.ReadInt();
+                c.cnt = @is.ReadInt();
+                c.@ref = @is.ReadInt();
+                c.skip = @is.ReadInt();
+                cells[ch] = c;
+            }
+        }
+
+        /// <summary>
+        /// The default constructor for the <see cref="Row"/> object.
+        /// </summary>
+        public Row() { }
+
+        /// <summary>
+        /// Construct a <see cref="Row"/> using the cells of the given <see cref="Row"/>.
+        /// </summary>
+        /// <param name="old">the <see cref="Row"/> to copy</param>
+        public Row(Row old)
+        {
+            cells = old.cells;
+        }
+
+        /// <summary>
+        /// Set the command in the <see cref="Cell"/> of the given <see cref="char"/> to the given <see cref="int"/>.
+        /// </summary>
+        /// <param name="way">the <see cref="char"/> defining the <see cref="Cell"/></param>
+        /// <param name="cmd">the new command</param>
+        public void SetCmd(char way, int cmd)
+        {
+            Cell c = At(way);
+            if (c == null)
+            {
+                c = new Cell();
+                c.cmd = cmd;
+                cells[way] = c;
+            }
+            else
+            {
+                c.cmd = cmd;
+            }
+            c.cnt = (cmd >= 0) ? 1 : 0;
+        }
+
+        /// <summary>
+        /// Set the reference to the next row in the <see cref="Cell"/> of the given <see cref="char"/> to the
+        /// given <see cref="int"/>.
+        /// </summary>
+        /// <param name="way">the <see cref="char"/> defining the <see cref="Cell"/></param>
+        /// <param name="ref">The new ref value</param>
+        public void SetRef(char way, int @ref)
+        {
+            Cell c = At(way);
+            if (c == null)
+            {
+                c = new Cell();
+                c.@ref = @ref;
+                cells[way] = c;
+            }
+            else
+            {
+                c.@ref = @ref;
+            }
+        }
+
+        /// <summary>
+        /// Return the number of cells in use.
+        /// </summary>
+        /// <returns>the number of cells in use</returns>
+        public int GetCells()
+        {
+            IEnumerator<char> i = cells.Keys.GetEnumerator();
+            int size = 0;
+            for (; i.MoveNext();)
+            {
+                char c = i.Current;
+                Cell e = At(c);
+                if (e.cmd >= 0 || e.@ref >= 0)
+                {
+                    size++;
+                }
+            }
+            return size;
+        }
+
+        /// <summary>
+        /// Return the number of references (how many transitions) to other rows.
+        /// </summary>
+        /// <returns>the number of references</returns>
+        public int GetCellsPnt()
+        {
+            IEnumerator<char> i = cells.Keys.GetEnumerator();
+            int size = 0;
+            for (; i.MoveNext();)
+            {
+                char c = i.Current;
+                Cell e = At(c);
+                if (e.@ref >= 0)
+                {
+                    size++;
+                }
+            }
+            return size;
+        }
+
+        /// <summary>
+        /// Return the number of patch commands saved in this Row.
+        /// </summary>
+        /// <returns>the number of patch commands</returns>
+        public int GetCellsVal()
+        {
+            IEnumerator<char> i = cells.Keys.GetEnumerator();
+            int size = 0;
+            for (; i.MoveNext();)
+            {
+                char c = i.Current;
+                Cell e = At(c);
+                if (e.cmd >= 0)
+                {
+                    size++;
+                }
+            }
+            return size;
+        }
+
+        /// <summary>
+        /// Return the command in the <see cref="Cell"/> associated with the given <see cref="char"/>.
+        /// </summary>
+        /// <param name="way">the <see cref="char"/> associated with the <see cref="Cell"/> holding the desired command</param>
+        /// <returns>the command</returns>
+        public int GetCmd(char way)
+        {
+            Cell c = At(way);
+            return (c == null) ? -1 : c.cmd;
+        }
+
+        /// <summary>
+        /// Return the number of patch commands were in the <see cref="Cell"/> associated with the
+        /// given <see cref="char"/> before the <see cref="Trie"/> containing this <see cref="Row"/> was reduced.
+        /// </summary>
+        /// <param name="way">the <see cref="char"/> associated with the desired <see cref="Cell"/></param>
+        /// <returns>the number of patch commands before reduction</returns>
+        public int GetCnt(char way)
+        {
+            Cell c = At(way);
+            return (c == null) ? -1 : c.cnt;
+        }
+
+        /// <summary>
+        /// Return the reference to the next <see cref="Row"/> in the <see cref="Cell"/> associated with the given
+        /// <see cref="char"/>.
+        /// </summary>
+        /// <param name="way">the <see cref="char"/> associated with the desired <see cref="Cell"/></param>
+        /// <returns>the reference, or -1 if the <see cref="Cell"/> is <c>null</c></returns>
+        public int GetRef(char way)
+        {
+            Cell c = At(way);
+            return (c == null) ? -1 : c.@ref;
+        }
+
+        /// <summary>
+        /// Write the contents of this <see cref="Row"/> to the given output stream.
+        /// </summary>
+        /// <param name="os">the output stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public virtual void Store(IDataOutput os)
+        {
+            os.WriteInt(cells.Count);
+            IEnumerator<char> i = cells.Keys.GetEnumerator();
+            for (; i.MoveNext();)
+            {
+                char c = i.Current;
+                Cell e = At(c);
+                if (e.cmd < 0 && e.@ref < 0)
+                {
+                    continue;
+                }
+
+                os.WriteChar(c);
+                os.WriteInt(e.cmd);
+                os.WriteInt(e.cnt);
+                os.WriteInt(e.@ref);
+                os.WriteInt(e.skip);
+            }
+        }
+
+        /// <summary>
+        /// Return the number of identical <see cref="Cell"/>s (containing patch commands) in this
+        /// Row.
+        /// </summary>
+        /// <param name="eqSkip">when set to <c>false</c> the removed patch commands are considered</param>
+        /// <returns>the number of identical <see cref="Cell"/>s, or -1 if there are (at least) two different <see cref="Cell"/>s</returns>
+        public int UniformCmd(bool eqSkip)
+        {
+            IEnumerator<Cell> i = cells.Values.GetEnumerator();
+            int ret = -1;
+            uniformCnt = 1;
+            uniformSkip = 0;
+            for (; i.MoveNext();)
+            {
+                Cell c = i.Current;
+                if (c.@ref >= 0)
+                {
+                    return -1;
+                }
+                if (c.cmd >= 0)
+                {
+                    if (ret < 0)
+                    {
+                        ret = c.cmd;
+                        uniformSkip = c.skip;
+                    }
+                    else if (ret == c.cmd)
+                    {
+                        if (eqSkip)
+                        {
+                            if (uniformSkip == c.skip)
+                            {
+                                uniformCnt++;
+                            }
+                            else
+                            {
+                                return -1;
+                            }
+                        }
+                        else
+                        {
+                            uniformCnt++;
+                        }
+                    }
+                    else
+                    {
+                        return -1;
+                    }
+                }
+            }
+            return ret;
+        }
+
+        /// <summary>
+        /// Write the contents of this <see cref="Row"/> to the <see cref="TextWriter"/>.
+        /// </summary>
+        /// <param name="out"></param>
+        public virtual void Print(TextWriter @out)
+        {
+            for (IEnumerator<char> i = cells.Keys.GetEnumerator(); i.MoveNext();)
+            {
+                char ch = i.Current;
+                Cell c = At(ch);
+                @out.Write("[" + ch + ":" + c + "]");
+            }
+            @out.WriteLine();
+        }
+
+        internal Cell At(char index)
+        {
+            return cells.ContainsKey(index) ? cells[index] : null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs
new file mode 100644
index 0000000..905f213
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs
@@ -0,0 +1,472 @@
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
+using System.IO;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// A <see cref="Trie"/> is used to store a dictionary of words and their stems.
+    /// <para>
+    /// Actually, what is stored are words with their respective patch commands. A
+    /// trie can be termed forward (keys read from left to right) or backward (keys
+    /// read from right to left). This property will vary depending on the language
+    /// for which a <see cref="Trie"/> is constructed.
+    /// </para>
+    /// </summary>
+    public class Trie
+    {
+        internal IList<Row> rows = new List<Row>();
+        internal IList<string> cmds = new List<string>();
+        internal int root;
+
+        internal bool forward = false;
+
+        /// <summary>
+        /// Constructor for the <see cref="Trie"/> object.
+        /// </summary>
+        /// <param name="is">the input stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public Trie(IDataInput @is)
+        {
+            forward = @is.ReadBoolean();
+            root = @is.ReadInt();
+            for (int i = @is.ReadInt(); i > 0; i--)
+            {
+                cmds.Add(@is.ReadUTF());
+            }
+            for (int i = @is.ReadInt(); i > 0; i--)
+            {
+                rows.Add(new Row(@is));
+            }
+        }
+
+        /// <summary>
+        /// Constructor for the <see cref="Trie"/> object.
+        /// </summary>
+        /// <param name="forward">set to <c>true</c></param>
+        public Trie(bool forward)
+        {
+            rows.Add(new Row());
+            root = 0;
+            this.forward = forward;
+        }
+
+        /// <summary>
+        /// Constructor for the <see cref="Trie"/> object.
+        /// </summary>
+        /// <param name="forward"><c>true</c> if read left to right, <c>false</c> if read right to left</param>
+        /// <param name="root">index of the row that is the root node</param>
+        /// <param name="cmds">the patch commands to store</param>
+        /// <param name="rows">a Vector of Vectors. Each inner Vector is a node of this <see cref="Trie"/></param>
+        public Trie(bool forward, int root, IList<string> cmds, IList<Row> rows)
+        {
+            this.rows = rows;
+            this.cmds = cmds;
+            this.root = root;
+            this.forward = forward;
+        }
+
+        /// <summary>
+        /// Gets the all attribute of the <see cref="Trie"/> object
+        /// </summary>
+        /// <param name="key">Description of the Parameter</param>
+        /// <returns>The all value</returns>
+        public virtual string[] GetAll(string key)
+        {
+            int[] res = new int[key.Length];
+            int resc = 0;
+            Row now = GetRow(root);
+            int w;
+            StrEnum e = new StrEnum(key, forward);
+            bool br = false;
+
+            for (int i = 0; i < key.Length - 1; i++)
+            {
+                char ch = e.Next();
+                w = now.GetCmd(ch);
+                if (w >= 0)
+                {
+                    int n = w;
+                    for (int j = 0; j < resc; j++)
+                    {
+                        if (n == res[j])
+                        {
+                            n = -1;
+                            break;
+                        }
+                    }
+                    if (n >= 0)
+                    {
+                        res[resc++] = n;
+                    }
+                }
+                w = now.GetRef(ch);
+                if (w >= 0)
+                {
+                    now = GetRow(w);
+                }
+                else
+                {
+                    br = true;
+                    break;
+                }
+            }
+            if (br == false)
+            {
+                w = now.GetCmd(e.Next());
+                if (w >= 0)
+                {
+                    int n = w;
+                    for (int j = 0; j < resc; j++)
+                    {
+                        if (n == res[j])
+                        {
+                            n = -1;
+                            break;
+                        }
+                    }
+                    if (n >= 0)
+                    {
+                        res[resc++] = n;
+                    }
+                }
+            }
+
+            if (resc < 1)
+            {
+                return null;
+            }
+            string[] R = new string[resc];
+            for (int j = 0; j < resc; j++)
+            {
+                R[j] = cmds[res[j]];
+            }
+            return R;
+        }
+
+        /// <summary>
+        /// Return the number of cells in this <see cref="Trie"/> object.
+        /// </summary>
+        /// <returns>the number of cells</returns>
+        public virtual int GetCells()
+        {
+            int size = 0;
+            foreach (Row row in rows)
+                size += row.GetCells();
+            return size;
+        }
+
+        /// <summary>
+        /// Gets the cellsPnt attribute of the <see cref="Trie"/> object
+        /// </summary>
+        /// <returns>The cellsPnt value</returns>
+        public virtual int GetCellsPnt()
+        {
+            int size = 0;
+            foreach (Row row in rows)
+                size += row.GetCellsPnt();
+            return size;
+        }
+
+        /// <summary>
+        /// Gets the cellsVal attribute of the <see cref="Trie"/> object
+        /// </summary>
+        /// <returns>The cellsVal value</returns>
+        public virtual int GetCellsVal()
+        {
+            int size = 0;
+            foreach (Row row in rows)
+                size += row.GetCellsVal();
+            return size;
+        }
+
+        /// <summary>
+        /// Return the element that is stored in a cell associated with the given key.
+        /// </summary>
+        /// <param name="key">the key</param>
+        /// <returns>the associated element</returns>
+        public virtual string GetFully(string key)
+        {
+            Row now = GetRow(root);
+            int w;
+            Cell c;
+            int cmd = -1;
+            StrEnum e = new StrEnum(key, forward);
+            char ch;
+            char aux;
+
+            for (int i = 0; i < key.Length;)
+            {
+                ch = e.Next();
+                i++;
+
+                c = now.At(ch);
+                if (c == null)
+                {
+                    return null;
+                }
+
+                cmd = c.cmd;
+
+                for (int skip = c.skip; skip > 0; skip--)
+                {
+                    if (i < key.Length)
+                    {
+                        aux = e.Next();
+                    }
+                    else
+                    {
+                        return null;
+                    }
+                    i++;
+                }
+
+                w = now.GetRef(ch);
+                if (w >= 0)
+                {
+                    now = GetRow(w);
+                }
+                else if (i < key.Length)
+                {
+                    return null;
+                }
+            }
+            return (cmd == -1) ? null : cmds[cmd];
+        }
+
+        /// <summary>
+        /// Return the element that is stored as last on a path associated with the
+        /// given key.
+        /// </summary>
+        /// <param name="key">the key associated with the desired element</param>
+        /// <returns>the last on path element</returns>
+        public virtual string GetLastOnPath(string key)
+        {
+            Row now = GetRow(root);
+            int w;
+            string last = null;
+            StrEnum e = new StrEnum(key, forward);
+
+            for (int i = 0; i < key.Length - 1; i++)
+            {
+                char ch = e.Next();
+                w = now.GetCmd(ch);
+                if (w >= 0)
+                {
+                    last = cmds[w];
+                }
+                w = now.GetRef(ch);
+                if (w >= 0)
+                {
+                    now = GetRow(w);
+                }
+                else
+                {
+                    return last;
+                }
+            }
+            w = now.GetCmd(e.Next());
+            return (w >= 0) ? cmds[w] : last;
+        }
+
+        /// <summary>
+        /// Return the <see cref="Row"/> at the given index.
+        /// </summary>
+        /// <param name="index">the index containing the desired <see cref="Row"/></param>
+        /// <returns>the <see cref="Row"/></returns>
+        private Row GetRow(int index)
+        {
+            if (index < 0 || index >= rows.Count)
+            {
+                return null;
+            }
+            return rows[index];
+        }
+
+        /// <summary>
+        /// Write this <see cref="Trie"/> to the given output stream.
+        /// </summary>
+        /// <param name="os">the output stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public virtual void Store(IDataOutput os)
+        {
+            os.WriteBoolean(forward);
+            os.WriteInt(root);
+            os.WriteInt(cmds.Count);
+            foreach (string cmd in cmds)
+                os.WriteUTF(cmd);
+
+            os.WriteInt(rows.Count);
+            foreach (Row row in rows)
+                row.Store(os);
+        }
+
+        /// <summary>
+        /// Add the given key associated with the given patch command. If either
+        /// parameter is null this method will return without executing.
+        /// </summary>
+        /// <param name="key">the key</param>
+        /// <param name="cmd">the patch command</param>
+        public virtual void Add(string key, string cmd)
+        {
+            if (key == null || cmd == null)
+            {
+                return;
+            }
+            if (cmd.Length == 0)
+            {
+                return;
+            }
+            int id_cmd = cmds.IndexOf(cmd);
+            if (id_cmd == -1)
+            {
+                id_cmd = cmds.Count;
+                cmds.Add(cmd);
+            }
+
+            int node = root;
+            Row r = GetRow(node);
+
+            StrEnum e = new StrEnum(key, forward);
+
+            for (int i = 0; i < e.Length - 1; i++)
+            {
+                char ch = e.Next();
+                node = r.GetRef(ch);
+                if (node >= 0)
+                {
+                    r = GetRow(node);
+                }
+                else
+                {
+                    node = rows.Count;
+                    Row n;
+                    rows.Add(n = new Row());
+                    r.SetRef(ch, node);
+                    r = n;
+                }
+            }
+            r.SetCmd(e.Next(), id_cmd);
+        }
+
+        /// <summary>
+        /// Remove empty rows from the given <see cref="Trie"/> and return the newly reduced <see cref="Trie"/>.
+        /// </summary>
+        /// <param name="by">the <see cref="Trie"/> to reduce</param>
+        /// <returns>newly reduced <see cref="Trie"/></returns>
+        public virtual Trie Reduce(Reduce by)
+        {
+            return by.Optimize(this);
+        }
+
+        /// <summary>
+        /// writes debugging info to the printstream
+        /// </summary>
+        public virtual void PrintInfo(TextWriter @out, string prefix)
+        {
+            @out.WriteLine(prefix + "nds " + rows.Count + " cmds " + cmds.Count
+                + " cells " + GetCells() + " valcells " + GetCellsVal() + " pntcells "
+                + GetCellsPnt());
+        }
+
+        /// <summary>
+        /// This class is part of the Egothor Project
+        /// </summary>
+        internal class StrEnum
+        {
+            private string s;
+            private int from;
+            private int by;
+
+            /// <summary>
+            /// Constructor for the <see cref="StrEnum"/> object
+            /// </summary>
+            /// <param name="s">Description of the Parameter</param>
+            /// <param name="up">Description of the Parameter</param>
+            internal StrEnum(string s, bool up)
+            {
+                this.s = s;
+                if (up)
+                {
+                    from = 0;
+                    by = 1;
+                }
+                else
+                {
+                    from = s.Length - 1;
+                    by = -1;
+                }
+            }
+
+            internal int Length
+            {
+                get
+                {
+                    return s.Length;
+                }
+            }
+
+            internal char Next()
+            {
+                char ch = s[from];
+                from += by;
+                return ch;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj b/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
new file mode 100644
index 0000000..0f82c21
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
@@ -0,0 +1,87 @@
+\ufeff<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{A76DAD88-E3A5-40F9-9114-FACD77BD8265}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Lucene.Net.Analysis</RootNamespace>
+    <AssemblyName>Lucene.Net.Analysis.Stempel</AssemblyName>
+    <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Egothor.Stemmer\Cell.cs" />
+    <Compile Include="Egothor.Stemmer\Compile.cs" />
+    <Compile Include="Egothor.Stemmer\Diff.cs" />
+    <Compile Include="Egothor.Stemmer\DiffIt.cs" />
+    <Compile Include="Egothor.Stemmer\Gener.cs" />
+    <Compile Include="Egothor.Stemmer\Lift.cs" />
+    <Compile Include="Egothor.Stemmer\MultiTrie.cs" />
+    <Compile Include="Egothor.Stemmer\MultiTrie2.cs" />
+    <Compile Include="Egothor.Stemmer\Optimizer.cs" />
+    <Compile Include="Egothor.Stemmer\Optimizer2.cs" />
+    <Compile Include="Egothor.Stemmer\Reduce.cs" />
+    <Compile Include="Egothor.Stemmer\Row.cs" />
+    <Compile Include="Egothor.Stemmer\Trie.cs" />
+    <Compile Include="Pl\PolishAnalyzer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="RectangularArrays.cs" />
+    <Compile Include="Stempel\StempelFilter.cs" />
+    <Compile Include="Stempel\StempelPolishStemFilterFactory.cs" />
+    <Compile Include="Stempel\StempelStemmer.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Pl\stemmer_20000.tbl" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Lucene.Net.Analysis.Common\Lucene.Net.Analysis.Common.csproj">
+      <Project>{4add0bbc-b900-4715-9526-d871de8eea64}</Project>
+      <Name>Lucene.Net.Analysis.Common</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Lucene.Net.Core\Lucene.Net.csproj">
+      <Project>{5d4ad9be-1ffb-41ab-9943-25737971bf57}</Project>
+      <Name>Lucene.Net</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Pl\stopwords.txt" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs b/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs
new file mode 100644
index 0000000..7cc5773
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Pl/PolishAnalyzer.cs
@@ -0,0 +1,164 @@
+\ufeffusing Egothor.Stemmer;
+using Lucene.Net.Analysis.Core;
+using Lucene.Net.Analysis.Miscellaneous;
+using Lucene.Net.Analysis.Standard;
+using Lucene.Net.Analysis.Stempel;
+using Lucene.Net.Analysis.Util;
+using Lucene.Net.Util;
+using System;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace Lucene.Net.Analysis.Pl
+{
+    /*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+    /// <summary>
+    /// <see cref="Analyzer"/> for Polish.
+    /// </summary>
+    public sealed class PolishAnalyzer : StopwordAnalyzerBase
+    {
+        private readonly CharArraySet stemExclusionSet;
+        private readonly Trie stemTable;
+
+        /// <summary>
+        /// File containing default Polish stopwords.
+        /// </summary>
+        public readonly static string DEFAULT_STOPWORD_FILE = "stopwords.txt";
+
+        /// <summary>
+        /// File containing default Polish stemmer table.
+        /// </summary>
+        public readonly static string DEFAULT_STEMMER_FILE = "stemmer_20000.tbl";
+
+        /// <summary>
+        /// Returns an unmodifiable instance of the default stop words set.
+        /// </summary>
+        /// <returns>default stop words set.</returns>
+        public static CharArraySet GetDefaultStopSet()
+        {
+            return DefaultsHolder.DEFAULT_STOP_SET;
+        }
+
+        /// <summary>
+        /// Returns an unmodifiable instance of the default stemmer table.
+        /// </summary>
+        public static Trie GetDefaultTable()
+        {
+            return DefaultsHolder.DEFAULT_TABLE;
+        }
+
+        /// <summary>
+        /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once the outer class 
+        /// accesses the static final set the first time.;
+        /// </summary>
+        private class DefaultsHolder
+        {
+            internal static readonly CharArraySet DEFAULT_STOP_SET;
+            internal static readonly Trie DEFAULT_TABLE;
+
+            static DefaultsHolder()
+            {
+                try
+                {
+                    DEFAULT_STOP_SET = WordlistLoader.GetWordSet(IOUtils.GetDecodingReader(typeof(PolishAnalyzer),
+                        typeof(PolishAnalyzer).Namespace + "." + DEFAULT_STOPWORD_FILE, Encoding.UTF8), "#",
+#pragma warning disable 612, 618
+                        LuceneVersion.LUCENE_CURRENT);
+#pragma warning restore 612, 618
+                }
+                catch (IOException ex)
+                {
+                    // default set should always be present as it is part of the
+                    // distribution (embedded resource)
+                    throw new SystemException("Unable to load default stopword set", ex);
+                }
+
+                try
+                {
+                    DEFAULT_TABLE = StempelStemmer.Load(typeof(PolishAnalyzer).Assembly.GetManifestResourceStream(
+                        typeof(PolishAnalyzer).Namespace + "." + DEFAULT_STEMMER_FILE));
+                }
+                catch (IOException ex)
+                {
+                    // default set should always be present as it is part of the
+                    // distribution (embedded resource)
+                    throw new SystemException("Unable to load default stemming tables", ex);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Builds an analyzer with the default stop words: <see cref="DEFAULT_STOPWORD_FILE"/>.
+        /// </summary>
+        /// <param name="matchVersion">lucene compatibility version</param>
+        public PolishAnalyzer(LuceneVersion matchVersion)
+            : this(matchVersion, DefaultsHolder.DEFAULT_STOP_SET)
+        {
+        }
+
+        /// <summary>
+        /// Builds an analyzer with the given stop words.
+        /// </summary>
+        /// <param name="matchVersion">lucene compatibility version</param>
+        /// <param name="stopwords">a stopword set</param>
+        public PolishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
+            : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
+        {
+        }
+
+        /// <summary>
+        /// Builds an analyzer with the given stop words. If a non-empty stem exclusion set is
+        /// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
+        /// stemming.
+        /// </summary>
+        /// <param name="matchVersion">lucene compatibility version</param>
+        /// <param name="stopwords">a stopword set</param>
+        /// <param name="stemExclusionSet">a set of terms not to be stemmed</param>
+        public PolishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
+            : base(matchVersion, stopwords)
+        {
+            this.stemTable = DefaultsHolder.DEFAULT_TABLE;
+            this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(
+                matchVersion, stemExclusionSet));
+        }
+
+        /// <summary>
+        /// Creates a <see cref="Analyzer.TokenStreamComponents"/>
+        /// which tokenizes all the text in the provided <see cref="TextReader"/>.
+        /// </summary>
+        /// <returns>
+        /// A <see cref="Analyzer.TokenStreamComponents"/> built from an <see cref="StandardTokenizer"/>
+        /// filtered with <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>, 
+        /// <see cref="SetKeywordMarkerFilter"/> if a stem excusion set is provided and <see cref="StempelFilter"/>.
+        /// </returns>
+        public override TokenStreamComponents CreateComponents(string fieldName,
+            TextReader reader)
+        {
+            Tokenizer source = new StandardTokenizer(matchVersion, reader);
+            TokenStream result = new StandardFilter(matchVersion, source);
+            result = new LowerCaseFilter(matchVersion, result);
+            result = new StopFilter(matchVersion, result, stopwords);
+            if (stemExclusionSet.Any())
+                result = new SetKeywordMarkerFilter(result, stemExclusionSet);
+            result = new StempelFilter(result, new StempelStemmer(stemTable));
+            return new TokenStreamComponents(source, result);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Pl/stemmer_20000.tbl
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Pl/stemmer_20000.tbl b/src/Lucene.Net.Analysis.Stempel/Pl/stemmer_20000.tbl
new file mode 100644
index 0000000..64c89a9
Binary files /dev/null and b/src/Lucene.Net.Analysis.Stempel/Pl/stemmer_20000.tbl differ

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Pl/stopwords.txt
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Pl/stopwords.txt b/src/Lucene.Net.Analysis.Stempel/Pl/stopwords.txt
new file mode 100644
index 0000000..167e9e0
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Pl/stopwords.txt
@@ -0,0 +1,186 @@
+# This file was created from the carrot2 project and is distributed under the BSD license.
+# See http://project.carrot2.org/license.html
+# Also see http://www.opensource.org/licenses/bsd-license.html
+# From trunk/core/carrot2-util-text/src-resources/stopwords.pl
+vol
+o.o.
+mgr
+godz
+z\u0142
+www
+pl
+ul
+tel
+hab
+prof
+in\u017c
+dr
+i
+u
+aby
+albo
+ale
+ani
+a\u017c
+bardzo
+bez
+bo
+bowiem
+by
+byli
+bym
+by\u0142
+by\u0142a
+by\u0142o
+by\u0142y
+by\u0107
+b\u0119dzie
+b\u0119d\u0105
+chce
+cho\u0107
+co
+coraz
+co\u015b
+czy
+czyli
+cz\u0119sto
+dla
+do
+gdy
+gdyby
+gdy\u017c
+gdzie
+go
+ich
+im
+inne
+i\u017c
+ja
+jak
+jakie
+jako
+je
+jednak
+jednym
+jedynie
+jego
+jej
+jest
+jeszcze
+je\u015bli
+je\u017celi
+ju\u017c
+j\u0105
+kiedy
+kilku
+kto
+kt�ra
+kt�re
+kt�rego
+kt�rej
+kt�ry
+kt�rych
+kt�rym
+kt�rzy
+lat
+lecz
+lub
+ma
+maj\u0105
+mamy
+mi
+mia\u0142
+mimo
+mnie
+mog\u0105
+mo\u017ce
+mo\u017cna
+mu
+musi
+na
+nad
+nam
+nas
+nawet
+nic
+nich
+nie
+niej
+nim
+ni\u017c
+no
+nowe
+np
+nr
+o
+od
+ok
+on
+one
+oraz
+pan
+po
+pod
+ponad
+poniewa\u017c
+poza
+przed
+przede
+przez
+przy
+raz
+razie
+roku
+r�wnie\u017c
+si\u0119
+sobie
+spos�b
+swoje
+s\u0105
+ta
+tak
+takich
+takie
+tak\u017ce
+tam
+te
+tego
+tej
+temu
+ten
+teraz
+te\u017c
+to
+trzeba
+tu
+tych
+tylko
+tym
+tys
+tzw
+t\u0119
+w
+we
+wie
+wi\u0119c
+wszystko
+w\u015br�d
+w\u0142a\u015bnie
+z
+za
+za\u015b
+ze
+\u017ce
+\u017ceby
+ii
+iii
+iv
+vi
+vii
+viii
+ix
+xi
+xii
+xiii
+xiv
+xv

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs b/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..56385ee
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs
@@ -0,0 +1,39 @@
+\ufeffusing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Lucene.Net.Analysis.Stempel")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Lucene.Net.Analysis.Stempel")]
+[assembly: AssemblyCopyright("Copyright �  2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a76dad88-e3a5-40f9-9114-facd77bd8265")]
+
+// for testing
+[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Stempel")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/RectangularArrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/RectangularArrays.cs b/src/Lucene.Net.Analysis.Stempel/RectangularArrays.cs
new file mode 100644
index 0000000..25acdf2
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/RectangularArrays.cs
@@ -0,0 +1,52 @@
+\ufeff//----------------------------------------------------------------------------------------
+//	Copyright � 2007 - 2013 Tangible Software Solutions Inc.
+//	this class can be used by anyone provided that the copyright notice remains intact.
+//
+//	this class provides the logic to simulate Java rectangular arrays, which are jagged
+//	arrays with inner arrays of the same length. A size of -1 indicates unknown length.
+//----------------------------------------------------------------------------------------
+
+using Lucene.Net.Util;
+
+internal static partial class RectangularArrays
+{
+    internal static int[][] ReturnRectangularIntArray(int Size1, int Size2)
+    {
+        int[][] Array;
+        if (Size1 > -1)
+        {
+            Array = new int[Size1][];
+            if (Size2 > -1)
+            {
+                for (int Array1 = 0; Array1 < Size1; Array1++)
+                {
+                    Array[Array1] = new int[Size2];
+                }
+            }
+        }
+        else
+            Array = null;
+
+        return Array;
+    }
+
+    internal static BytesRef[][] ReturnRectangularBytesRefArray(int Size1, int Size2)
+    {
+        BytesRef[][] Array;
+        if (Size1 > -1)
+        {
+            Array = new BytesRef[Size1][];
+            if (Size2 > -1)
+            {
+                for (int Array1 = 0; Array1 < Size1; Array1++)
+                {
+                    Array[Array1] = new BytesRef[Size2];
+                }
+            }
+        }
+        else
+            Array = null;
+
+        return Array;
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Stempel/StempelFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Stempel/StempelFilter.cs b/src/Lucene.Net.Analysis.Stempel/Stempel/StempelFilter.cs
new file mode 100644
index 0000000..f2964ea
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Stempel/StempelFilter.cs
@@ -0,0 +1,91 @@
+\ufeffusing Lucene.Net.Analysis.Tokenattributes;
+using System.Text;
+
+namespace Lucene.Net.Analysis.Stempel
+{
+    /*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+    /// <summary>
+    /// Transforms the token stream as per the stemming algorithm.
+    /// <para>
+    /// Note: the input to the stemming filter must already be in lower case, so you
+    /// will need to use <see cref="Analysis.Core.LowerCaseFilter"/> or <see cref="Analysis.Core.LowerCaseTokenizer"/> farther down the
+    /// <see cref="Tokenizer"/> chain in order for this to work properly!
+    /// </para>
+    /// </summary>
+    public sealed class StempelFilter : TokenFilter
+    {
+        private readonly ICharTermAttribute termAtt;
+        private readonly IKeywordAttribute keywordAtt;
+        private readonly StempelStemmer stemmer;
+        private readonly int minLength;
+
+        /// <summary>
+        /// Minimum length of input words to be processed. Shorter words are returned
+        /// unchanged.
+        /// </summary>
+        public static readonly int DEFAULT_MIN_LENGTH = 3;
+
+        /// <summary>
+        /// Create filter using the supplied stemming table.
+        /// </summary>
+        /// <param name="in">input token stream</param>
+        /// <param name="stemmer">stemmer</param>
+        public StempelFilter(TokenStream @in, StempelStemmer stemmer)
+            : this(@in, stemmer, DEFAULT_MIN_LENGTH)
+        {
+        }
+
+        /// <summary>
+        /// Create filter using the supplied stemming table.
+        /// </summary>
+        /// <param name="in">input token stream</param>
+        /// <param name="stemmer">stemmer</param>
+        /// <param name="minLength">For performance reasons words shorter than minLength 
+        /// characters are not processed, but simply returned.</param>
+        public StempelFilter(TokenStream @in, StempelStemmer stemmer, int minLength)
+            : base(@in)
+        {
+            this.stemmer = stemmer;
+            this.minLength = minLength;
+            this.termAtt = AddAttribute<ICharTermAttribute>();
+            this.keywordAtt = AddAttribute<IKeywordAttribute>();
+        }
+
+        /// <summary>
+        /// Returns the next input <see cref="Token"/>, after being stemmed
+        /// </summary>
+        public override bool IncrementToken()
+        {
+            if (input.IncrementToken())
+            {
+                if (!keywordAtt.Keyword && termAtt.Length > minLength)
+                {
+                    StringBuilder sb = stemmer.Stem(termAtt.ToString());
+                    if (sb != null) // if we can't stem it, return unchanged
+                        termAtt.SetEmpty().Append(sb);
+                }
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Stempel/StempelPolishStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Stempel/StempelPolishStemFilterFactory.cs b/src/Lucene.Net.Analysis.Stempel/Stempel/StempelPolishStemFilterFactory.cs
new file mode 100644
index 0000000..759f403
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Stempel/StempelPolishStemFilterFactory.cs
@@ -0,0 +1,48 @@
+\ufeffusing Lucene.Net.Analysis.Pl;
+using Lucene.Net.Analysis.Util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Lucene.Net.Analysis.Stempel
+{
+    /*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+    /// <summary>
+    /// Factory for <see cref="StempelFilter"/> using a Polish stemming table.
+    /// </summary>
+    public class StempelPolishStemFilterFactory : TokenFilterFactory
+    {
+        /// <summary>
+        /// Creates a new <see cref="StempelPolishStemFilterFactory"/>
+        /// </summary>
+        public StempelPolishStemFilterFactory(IDictionary<string, string> args)
+            : base(args)
+        {
+            if (args.Any())
+            {
+                throw new ArgumentException("Unknown parameters: " + args);
+            }
+        }
+
+        public override TokenStream Create(TokenStream input)
+        {
+            return new StempelFilter(input, new StempelStemmer(PolishAnalyzer.GetDefaultTable()));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Stempel/StempelStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Stempel/StempelStemmer.cs b/src/Lucene.Net.Analysis.Stempel/Stempel/StempelStemmer.cs
new file mode 100644
index 0000000..43e544a
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Stempel/StempelStemmer.cs
@@ -0,0 +1,105 @@
+\ufeffusing Egothor.Stemmer;
+using Lucene.Net.Support;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Analysis.Stempel
+{
+    /*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+    /// <summary>
+    /// Stemmer class is a convenient facade for other stemmer-related classes. The
+    /// core stemming algorithm and its implementation is taken verbatim from the
+    /// Egothor project ( <a href="http://www.egothor.org">www.egothor.org </a>).
+    /// <para>
+    /// Even though the stemmer tables supplied in the distribution package are built
+    /// for Polish language, there is nothing language-specific here.
+    /// </para>
+    /// </summary>
+    public class StempelStemmer
+    {
+        private Trie stemmer = null;
+        private StringBuilder buffer = new StringBuilder();
+
+        /// <summary>
+        /// Create a Stemmer using selected stemmer table
+        /// </summary>
+        /// <param name="stemmerTable">stemmer table.</param>
+        public StempelStemmer(Stream stemmerTable)
+            : this(Load(stemmerTable))
+        {
+        }
+
+        /// <summary>
+        /// Create a Stemmer using pre-loaded stemmer table
+        /// </summary>
+        /// <param name="stemmer">pre-loaded stemmer table</param>
+        public StempelStemmer(Trie stemmer)
+        {
+            this.stemmer = stemmer;
+        }
+
+        /// <summary>
+        /// Load a stemmer table from an inputstream.
+        /// </summary>
+        public static Trie Load(Stream stemmerTable)
+        {
+            DataInputStream @in = null;
+            try
+            {
+                @in = new DataInputStream(stemmerTable);
+                string method = @in.ReadUTF().ToUpperInvariant();
+                if (method.IndexOf('M') < 0)
+                {
+                    return new Trie(@in);
+                }
+                else
+                {
+                    return new MultiTrie2(@in);
+                }
+            }
+            finally
+            {
+                @in.Dispose();
+            }
+        }
+
+        /// <summary>
+        /// Stem a word.
+        /// </summary>
+        /// <param name="word">input word to be stemmed.</param>
+        /// <returns>stemmed word, or null if the stem could not be generated.</returns>
+        public StringBuilder Stem(string word)
+        {
+            string cmd = stemmer.GetLastOnPath(word);
+
+            if (cmd == null)
+                return null;
+
+            buffer.Length = 0;
+            buffer.Append(word);
+
+            Diff.Apply(buffer, cmd);
+
+            if (buffer.Length > 0)
+                return buffer;
+            else
+                return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Core/Lucene.Net.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.csproj b/src/Lucene.Net.Core/Lucene.Net.csproj
index 75817c5..39bf69e 100644
--- a/src/Lucene.Net.Core/Lucene.Net.csproj
+++ b/src/Lucene.Net.Core/Lucene.Net.csproj
@@ -626,12 +626,16 @@
     <Compile Include="Support\ConcurrentHashMapWrapper.cs" />
     <Compile Include="Support\ConcurrentHashSet.cs" />
     <Compile Include="Support\CultureContext.cs" />
+    <Compile Include="Support\DataInputStream.cs" />
+    <Compile Include="Support\DataOutputStream.cs" />
     <Compile Include="Support\ErrorHandling.cs" />
     <Compile Include="Support\FileStreamExtensions.cs" />
     <Compile Include="Support\HashCodeMerge.cs" />
     <Compile Include="Support\ICallable.cs" />
     <Compile Include="Support\ICharSequence.cs" />
     <Compile Include="Support\ICompletionService.cs" />
+    <Compile Include="Support\IDataInput.cs" />
+    <Compile Include="Support\IDataOutput.cs" />
     <Compile Include="Support\IdentityComparer.cs" />
     <Compile Include="Support\IdentityHashMap.cs" />
     <Compile Include="Support\IdentityHashSet.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Core/Support/DataInputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/DataInputStream.cs b/src/Lucene.Net.Core/Support/DataInputStream.cs
new file mode 100644
index 0000000..30dc6a6
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/DataInputStream.cs
@@ -0,0 +1,323 @@
+\ufeffusing System;
+using System.IO;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Java's DataInputStream is similar to .NET's BinaryReader. However, it reads
+    /// using a modified UTF-8 format that cannot be read using BinaryReader.
+    /// This is a port of DataInputStream that is fully compatible with Java's DataOutputStream.
+    /// </summary>
+    public class DataInputStream : IDataInput, IDisposable
+    {
+        private readonly Stream @in;
+
+        /// <summary>
+        /// Creates a DataInputStream that uses the specified
+        /// underlying InputStream.
+        /// </summary>
+        /// <param name="in">the specified input stream</param>
+        public DataInputStream(Stream @in)
+        {
+            this.@in = @in;
+        }
+
+        /// <summary>
+        /// working arrays initialized on demand by readUTF
+        /// </summary>
+        private byte[] bytearr = new byte[80];
+        private char[] chararr = new char[80];
+
+        public int Read(byte[] b)
+        {
+            return @in.Read(b, 0, b.Length);
+        }
+
+        public int Read(byte[] b, int off, int len)
+        {
+            return @in.Read(b, off, len);
+        }
+
+        public void ReadFully(byte[] b)
+        {
+            ReadFully(b, 0, b.Length);
+        }
+
+        public void ReadFully(byte[] b, int off, int len)
+        {
+            if (len < 0)
+                throw new IndexOutOfRangeException();
+            int n = 0;
+            while (n < len)
+            {
+                int count = @in.Read(b, off + n, len - n);
+                if (count == 0)
+                    throw new EndOfStreamException();
+                n += count;
+            }
+        }
+
+        public int SkipBytes(int n)
+        {
+            int total = 0;
+            int cur = 0;
+
+            while ((total < n) && ((cur = (int)@in.Seek(n - total, SeekOrigin.Begin)) > 0))
+            {
+                total += cur;
+            }
+
+            return total;
+        }
+
+        public bool ReadBoolean()
+        {
+            int ch = @in.ReadByte();
+            if (ch < 0)
+                throw new EndOfStreamException();
+            return (ch != 0);
+        }
+
+        public byte ReadByte()
+        {
+            int ch = @in.ReadByte();
+            if (ch < 0)
+                throw new EndOfStreamException();
+            return (byte)(ch);
+        }
+
+        public int ReadUnsignedByte()
+        {
+            int ch = @in.ReadByte();
+            if (ch < 0)
+                throw new EndOfStreamException();
+            return ch;
+        }
+
+        public short ReadShort()
+        {
+            int ch1 = @in.ReadByte();
+            int ch2 = @in.ReadByte();
+            if ((ch1 | ch2) < 0)
+                throw new EndOfStreamException();
+            return (short)((ch1 << 8) + (ch2 << 0));
+        }
+
+        public int ReadUnsignedShort()
+        {
+            int ch1 = @in.ReadByte();
+            int ch2 = @in.ReadByte();
+            if ((ch1 | ch2) < 0)
+                throw new EndOfStreamException();
+            return (ch1 << 8) + (ch2 << 0);
+        }
+
+        public char ReadChar()
+        {
+            int ch1 = @in.ReadByte();
+            int ch2 = @in.ReadByte();
+            if ((ch1 | ch2) < 0)
+                throw new EndOfStreamException();
+            return (char)((ch1 << 8) + (ch2 << 0));
+        }
+
+        public int ReadInt()
+        {
+            int ch1 = @in.ReadByte();
+            int ch2 = @in.ReadByte();
+            int ch3 = @in.ReadByte();
+            int ch4 = @in.ReadByte();
+            if ((ch1 | ch2 | ch3 | ch4) < 0)
+                throw new EndOfStreamException();
+            return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
+        }
+
+        private byte[] readBuffer = new byte[8];
+
+        public long ReadLong()
+        {
+            ReadFully(readBuffer, 0, 8);
+            return (((long)readBuffer[0] << 56) +
+                    ((long)(readBuffer[1] & 255) << 48) +
+                    ((long)(readBuffer[2] & 255) << 40) +
+                    ((long)(readBuffer[3] & 255) << 32) +
+                    ((long)(readBuffer[4] & 255) << 24) +
+                    ((readBuffer[5] & 255) << 16) +
+                    ((readBuffer[6] & 255) << 8) +
+                    ((readBuffer[7] & 255) << 0));
+        }
+
+        public float ReadFloat()
+        {
+            return Number.IntBitsToFloat(ReadInt());
+        }
+
+        public double ReadDouble()
+        {
+            throw new NotImplementedException();
+            //return Number.LongBitsToDouble(ReadLong());
+        }
+
+        private char[] lineBuffer;
+
+        [Obsolete]
+        public string ReadLine()
+        {
+            char[] buf = lineBuffer;
+
+            if (buf == null)
+            {
+                buf = lineBuffer = new char[128];
+            }
+
+            int room = buf.Length;
+            int offset = 0;
+            int c;
+
+            while (true)
+            {
+                switch (c = @in.ReadByte())
+                {
+                    case -1:
+                    case '\n':
+                        goto loop;
+
+                    case '\r':
+                        int c2 = @in.ReadByte();
+                        if ((c2 != '\n') && (c2 != -1))
+                        {
+                            using (StreamReader reader = new StreamReader(@in))
+                            {
+                                c2 = reader.Peek();
+                            }
+                            // http://stackoverflow.com/a/8021738/181087
+                            //if (!(in is PushbackInputStream)) {
+                            //    this.in = new PushbackInputStream(in);
+                            //}
+                            //((PushbackInputStream)in).unread(c2);
+                        }
+                        goto loop;
+
+                    default:
+                        if (--room < 0)
+                        {
+                            buf = new char[offset + 128];
+                            room = buf.Length - offset - 1;
+                            System.Array.Copy(lineBuffer, 0, buf, 0, offset);
+                            lineBuffer = buf;
+                        }
+                        buf[offset++] = (char)c;
+                        break;
+                }
+            }
+            loop:
+            if ((c == -1) && (offset == 0))
+            {
+                return null;
+            }
+            return new string(buf, 0, offset);
+        }
+
+        public string ReadUTF()
+        {
+            return ReadUTF(this);
+        }
+
+        public static string ReadUTF(IDataInput @in)
+        {
+            int utflen = @in.ReadUnsignedShort();
+            byte[] bytearr = null;
+            char[] chararr = null;
+            if (@in is DataInputStream)
+            {
+                DataInputStream dis = (DataInputStream)@in;
+                if (dis.bytearr.Length < utflen)
+                {
+                    dis.bytearr = new byte[utflen * 2];
+                    dis.chararr = new char[utflen * 2];
+                }
+                chararr = dis.chararr;
+                bytearr = dis.bytearr;
+            }
+            else
+            {
+                bytearr = new byte[utflen];
+                chararr = new char[utflen];
+            }
+
+            int c, char2, char3;
+            int count = 0;
+            int chararr_count = 0;
+
+            @in.ReadFully(bytearr, 0, utflen);
+
+            while (count < utflen)
+            {
+                c = (int)bytearr[count] & 0xff;
+                if (c > 127) break;
+                count++;
+                chararr[chararr_count++] = (char)c;
+            }
+
+            while (count < utflen)
+            {
+                c = (int)bytearr[count] & 0xff;
+                switch (c >> 4)
+                {
+                    case 0:
+                    case 1:
+                    case 2:
+                    case 3:
+                    case 4:
+                    case 5:
+                    case 6:
+                    case 7:
+                        /* 0xxxxxxx*/
+                        count++;
+                        chararr[chararr_count++] = (char)c;
+                        break;
+                    case 12:
+                    case 13:
+                        /* 110x xxxx   10xx xxxx*/
+                        count += 2;
+                        if (count > utflen)
+                            throw new FormatException(
+                                "malformed input: partial character at end");
+                        char2 = (int)bytearr[count - 1];
+                        if ((char2 & 0xC0) != 0x80)
+                            throw new FormatException(
+                                "malformed input around byte " + count);
+                        chararr[chararr_count++] = (char)(((c & 0x1F) << 6) |
+                                                        (char2 & 0x3F));
+                        break;
+                    case 14:
+                        /* 1110 xxxx  10xx xxxx  10xx xxxx */
+                        count += 3;
+                        if (count > utflen)
+                            throw new FormatException(
+                                "malformed input: partial character at end");
+                        char2 = (int)bytearr[count - 2];
+                        char3 = (int)bytearr[count - 1];
+                        if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80))
+                            throw new FormatException(
+                                "malformed input around byte " + (count - 1));
+                        chararr[chararr_count++] = (char)(((c & 0x0F) << 12) |
+                                                        ((char2 & 0x3F) << 6) |
+                                                        ((char3 & 0x3F) << 0));
+                        break;
+                    default:
+                        /* 10xx xxxx,  1111 xxxx */
+                        throw new FormatException(
+                            "malformed input around byte " + count);
+                }
+            }
+            // The number of chars produced may be less than utflen
+            return new string(chararr, 0, chararr_count);
+        }
+
+        public void Dispose()
+        {
+            @in.Dispose();
+        }
+    }
+}


[17/50] [abbrv] lucenenet git commit: Fixed bugs in Core.Search.FieldCache and Core.Search.TestFieldCache that were causing the TestFieldCache tests to fail.

Posted by ni...@apache.org.
Fixed bugs in Core.Search.FieldCache and Core.Search.TestFieldCache that were causing the TestFieldCache tests to fail.


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

Branch: refs/heads/master
Commit: 8cd8a60ce35ba3e8435973290673d0a55f03dc3c
Parents: a696d70
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 17 21:50:14 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:55 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/FieldCache.cs        | 20 ++++++++--------
 .../core/Search/TestFieldCache.cs               | 24 +++++++++++---------
 2 files changed, 23 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8cd8a60c/src/Lucene.Net.Core/Search/FieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldCache.cs b/src/Lucene.Net.Core/Search/FieldCache.cs
index 5626f0e..2e269c0 100644
--- a/src/Lucene.Net.Core/Search/FieldCache.cs
+++ b/src/Lucene.Net.Core/Search/FieldCache.cs
@@ -1,12 +1,12 @@
+using Lucene.Net.Documents;
 using System;
+using System.Globalization;
+using System.IO;
+using System.Runtime.CompilerServices;
 using System.Text;
-using Lucene.Net.Documents;
-using Lucene.Net.Index;
 
 namespace Lucene.Net.Search
 {
-    using System.IO;
-    using System.Runtime.CompilerServices;
     using AtomicReader = Lucene.Net.Index.AtomicReader;
     using BinaryDocValues = Lucene.Net.Index.BinaryDocValues;
     using Bits = Lucene.Net.Util.Bits;
@@ -496,7 +496,7 @@ namespace Lucene.Net.Search
                 // UTF8 bytes... but really users should use
                 // IntField, instead, which already decodes
                 // directly from byte[]
-                return sbyte.Parse(term.Utf8ToString());
+                return sbyte.Parse(term.Utf8ToString(), CultureInfo.InvariantCulture);
             }
 
             public override string ToString()
@@ -520,7 +520,7 @@ namespace Lucene.Net.Search
                 // UTF8 bytes... but really users should use
                 // IntField, instead, which already decodes
                 // directly from byte[]
-                return short.Parse(term.Utf8ToString());
+                return short.Parse(term.Utf8ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture);
             }
 
             public override string ToString()
@@ -544,7 +544,7 @@ namespace Lucene.Net.Search
                 // UTF8 bytes... but really users should use
                 // IntField, instead, which already decodes
                 // directly from byte[]
-                return int.Parse(term.Utf8ToString());
+                return int.Parse(term.Utf8ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture);
             }
 
             public TermsEnum TermsEnum(Terms terms)
@@ -568,7 +568,7 @@ namespace Lucene.Net.Search
                 // UTF8 bytes... but really users should use
                 // FloatField, instead, which already decodes
                 // directly from byte[]
-                return float.Parse(term.Utf8ToString());
+                return float.Parse(term.Utf8ToString(), NumberStyles.Float, CultureInfo.InvariantCulture);
             }
 
             public TermsEnum TermsEnum(Terms terms)
@@ -592,7 +592,7 @@ namespace Lucene.Net.Search
                 // UTF8 bytes... but really users should use
                 // LongField, instead, which already decodes
                 // directly from byte[]
-                return long.Parse(term.Utf8ToString());
+                return long.Parse(term.Utf8ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture);
             }
 
             public TermsEnum TermsEnum(Terms terms)
@@ -616,7 +616,7 @@ namespace Lucene.Net.Search
                 // UTF8 bytes... but really users should use
                 // DoubleField, instead, which already decodes
                 // directly from byte[]
-                return double.Parse(term.Utf8ToString());
+                return double.Parse(term.Utf8ToString(), NumberStyles.Float, CultureInfo.InvariantCulture);
             }
 
             public TermsEnum TermsEnum(Terms terms)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8cd8a60c/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
index ea634f7..abe05f7 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
@@ -1,9 +1,13 @@
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+using NUnit.Framework;
 using System;
 using System.Diagnostics;
 using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
 using System.Threading;
-using Lucene.Net.Util;
 
 namespace Lucene.Net.Search
 {
@@ -60,9 +64,7 @@ namespace Lucene.Net.Search
     using IOUtils = Lucene.Net.Util.IOUtils;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
     using TestUtil = Lucene.Net.Util.TestUtil;
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
+    
 
     [TestFixture]
     public class TestFieldCache : LuceneTestCase
@@ -98,15 +100,15 @@ namespace Lucene.Net.Search
             for (int i = 0; i < NUM_DOCS; i++)
             {
                 Document doc = new Document();
-                doc.Add(NewStringField("theLong", Convert.ToString(theLong--), Field.Store.NO));
-                doc.Add(NewStringField("theDouble", Convert.ToString(theDouble--), Field.Store.NO));
-                doc.Add(NewStringField("theByte", Convert.ToString(theByte--), Field.Store.NO));
-                doc.Add(NewStringField("theShort", Convert.ToString(theShort--), Field.Store.NO));
-                doc.Add(NewStringField("theInt", Convert.ToString(theInt--), Field.Store.NO));
-                doc.Add(NewStringField("theFloat", Convert.ToString(theFloat--), Field.Store.NO));
+                doc.Add(NewStringField("theLong", (theLong--).ToString(CultureInfo.InvariantCulture), Field.Store.NO));
+                doc.Add(NewStringField("theDouble", (theDouble--).ToString("R", CultureInfo.InvariantCulture), Field.Store.NO));
+                doc.Add(NewStringField("theByte", (theByte--).ToString(CultureInfo.InvariantCulture), Field.Store.NO));
+                doc.Add(NewStringField("theShort", (theShort--).ToString(CultureInfo.InvariantCulture), Field.Store.NO));
+                doc.Add(NewStringField("theInt", (theInt--).ToString(CultureInfo.InvariantCulture), Field.Store.NO));
+                doc.Add(NewStringField("theFloat", (theFloat--).ToString("R", CultureInfo.InvariantCulture), Field.Store.NO));
                 if (i % 2 == 0)
                 {
-                    doc.Add(NewStringField("sparse", Convert.ToString(i), Field.Store.NO));
+                    doc.Add(NewStringField("sparse", (i).ToString(CultureInfo.InvariantCulture), Field.Store.NO));
                 }
 
                 if (i % 2 == 0)


[04/50] [abbrv] lucenenet git commit: Added original Ignore message to Core.Util.Test2BPagedBytes

Posted by ni...@apache.org.
Added original Ignore message to Core.Util.Test2BPagedBytes


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

Branch: refs/heads/master
Commit: 2fdd96085d0577fbd3f5672aac7a07f2d95e9d2f
Parents: 9ed5ba4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 03:15:31 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:50 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/Test2BPagedBytes.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2fdd9608/src/Lucene.Net.Tests/core/Util/Test2BPagedBytes.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Test2BPagedBytes.cs b/src/Lucene.Net.Tests/core/Util/Test2BPagedBytes.cs
index 76089b9..c3229a8 100644
--- a/src/Lucene.Net.Tests/core/Util/Test2BPagedBytes.cs
+++ b/src/Lucene.Net.Tests/core/Util/Test2BPagedBytes.cs
@@ -31,7 +31,7 @@ namespace Lucene.Net.Util
     //using Ignore = org.junit.Ignore;
 
     //ORIGINAL LINE: @Ignore("You must increase heap to > 2 G to run this") public class Test2BPagedBytes extends LuceneTestCase
-    [Ignore]
+    [Ignore("You must increase heap to > 2 G to run this")]
     [TestFixture]
     public class Test2BPagedBytes : LuceneTestCase
     {


[11/50] [abbrv] lucenenet git commit: Added missing random task scheduler to LuceneTestCase.NewSearcher()

Posted by ni...@apache.org.
Added missing random task scheduler to LuceneTestCase.NewSearcher()


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

Branch: refs/heads/master
Commit: 1e1a5006e9aff68001c1cfb4c7f5533564a1197b
Parents: 4c54ef2
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 08:13:44 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:53 2016 +0700

----------------------------------------------------------------------
 .../Util/LuceneTestCase.cs                         | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1e1a5006/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index 87f0edb..186bc0e 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -1704,25 +1704,26 @@ namespace Lucene.Net.Util
             {
                 int threads = 0;
                 TaskScheduler ex;
-                /*if (random.NextBoolean())
-                {*/
+                if (random.NextBoolean())
+                {
                 ex = null;
-                /*}
+                }
                 else
                 {
                     threads = TestUtil.NextInt(random, 1, 8);
-                    ex = new ThreadPoolExecutor(threads, threads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<IThreadRunnable>(), new NamedThreadFactory("LuceneTestCase"));
+                    ex = new LimitedConcurrencyLevelTaskScheduler(threads);
+                    //ex = new ThreadPoolExecutor(threads, threads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<IThreadRunnable>(), new NamedThreadFactory("LuceneTestCase"));
                     // uncomment to intensify LUCENE-3840
                     // ex.prestartAllCoreThreads();
-                }*/
-                /*if (ex != null)
+                }
+                if (ex != null)
                 {
                     if (VERBOSE)
                     {
                         Console.WriteLine("NOTE: newSearcher using ExecutorService with " + threads + " threads");
                     }
-                    r.AddReaderClosedListener(new ReaderClosedListenerAnonymousInnerClassHelper(ex));
-                }*/
+                    //r.AddReaderClosedListener(new ReaderClosedListenerAnonymousInnerClassHelper(ex));
+                }
                 IndexSearcher ret;
                 if (wrapWithAssertions)
                 {


[22/50] [abbrv] lucenenet git commit: Fixed accessibility/initial size bugs when opening Core.Store.MMapDirectory.

Posted by ni...@apache.org.
Fixed accessibility/initial size bugs when opening Core.Store.MMapDirectory.


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

Branch: refs/heads/master
Commit: d7bbc4abb1b7b914bf6d462eb34eb852530656ee
Parents: fac1be2
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 18 18:21:04 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:57 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/MMapDirectory.cs | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7bbc4ab/src/Lucene.Net.Core/Store/MMapDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/MMapDirectory.cs b/src/Lucene.Net.Core/Store/MMapDirectory.cs
index b59ad88..4b8ec4b 100644
--- a/src/Lucene.Net.Core/Store/MMapDirectory.cs
+++ b/src/Lucene.Net.Core/Store/MMapDirectory.cs
@@ -137,7 +137,10 @@ namespace Lucene.Net.Store
         /// <summary>
         /// <code>true</code>, if this platform supports unmapping mmapped files.
         /// </summary>
-        public static readonly bool UNMAP_SUPPORTED;
+        // LUCENENET NOTE: Some JREs had a bug that didn't allow them to unmap.
+        // But according to MSDN, the MemoryMappedFile.Dispose() method will
+        // indeed "release all resources".
+        public static readonly bool UNMAP_SUPPORTED = true;
 
         /*static MMapDirectory()
         {
@@ -200,7 +203,7 @@ namespace Lucene.Net.Store
             EnsureOpen();
             var file = new FileInfo(Path.Combine(Directory.FullName, name));
 
-            var c = new FileStream(file.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
+            var c = new FileStream(file.FullName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
 
             return new MMapIndexInput(this, "MMapIndexInput(path=\"" + file + "\")", c);
         }
@@ -347,7 +350,7 @@ namespace Lucene.Net.Store
 
             if (input.memoryMappedFile == null)
             {
-                input.memoryMappedFile = MemoryMappedFile.CreateFromFile(fc, null, length == 0 ? 100 : length, MemoryMappedFileAccess.Read, null, HandleInheritability.Inheritable, false);
+                input.memoryMappedFile = MemoryMappedFile.CreateFromFile(fc, null, length == 0 ? 1024 : length, MemoryMappedFileAccess.ReadWrite, null, HandleInheritability.Inheritable, false);
             }
 
             long bufferStart = 0L;


[38/50] [abbrv] lucenenet git commit: Fixed bug in QueryParser.Ext.ExtendableQueryParser constructor that was causing extension not to be initialized correctly.

Posted by ni...@apache.org.
Fixed bug in QueryParser.Ext.ExtendableQueryParser constructor that was causing extension not to be initialized correctly.


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

Branch: refs/heads/master
Commit: d3c07f6d000faf7d7d23d8ea40485a5eef30f444
Parents: d4d462e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 23 05:39:28 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:46 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.QueryParser/Ext/ExtendableQueryParser.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d3c07f6d/src/Lucene.Net.QueryParser/Ext/ExtendableQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Ext/ExtendableQueryParser.cs b/src/Lucene.Net.QueryParser/Ext/ExtendableQueryParser.cs
index 08538a2..ef37215 100644
--- a/src/Lucene.Net.QueryParser/Ext/ExtendableQueryParser.cs
+++ b/src/Lucene.Net.QueryParser/Ext/ExtendableQueryParser.cs
@@ -87,7 +87,7 @@ namespace Lucene.Net.QueryParsers.Ext
         /// <param name="f">the default query field</param>
         /// <param name="a">the analyzer used to find terms in a query string</param>
         public ExtendableQueryParser(LuceneVersion matchVersion, string f, Analyzer a)
-            : base(matchVersion, f, a)
+            : this(matchVersion, f, a, DEFAULT_EXTENSION)
         {
         }
 


[35/50] [abbrv] lucenenet git commit: Removed unnecessary array declaration in Core.Util.FieldCacheSanityChecker.CheckSubreaders() - in .NET all that will do is take up more RAM for no reason.

Posted by ni...@apache.org.
Removed unnecessary array declaration in Core.Util.FieldCacheSanityChecker.CheckSubreaders() - in .NET all that will do is take up more RAM for no reason.


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

Branch: refs/heads/master
Commit: 6a2d485509a88c942bbe5a42f98cfb156775bc5a
Parents: 3979bbf
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Oct 21 01:59:32 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:45 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6a2d4855/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs b/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
index 8d7b293..7b33841 100644
--- a/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
+++ b/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
@@ -266,8 +266,7 @@ namespace Lucene.Net.Util
                     }
                 }
 
-                FieldCache.CacheEntry[] badness = new FieldCache.CacheEntry[badEntries.Count];
-                badness = badEntries.ToArray();//LUCENE TO-DO had param of badness first
+                FieldCache.CacheEntry[] badness = badEntries.ToArray();
 
                 insanity.Add(new Insanity(InsanityType.SUBREADER, "Found caches for descendants of " + parent.ToString(), badness));
             }


[30/50] [abbrv] lucenenet git commit: Revert "HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context."

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
index cbf656c..bf0a5fe 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
@@ -153,506 +153,5 @@ namespace Lucene.Net.Codecs.Perfield
                 }
             }
         }
-
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
index 05751f9..d2275e8 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
@@ -45,56 +45,5 @@ namespace Lucene.Net.Codecs.Perfield
             //LUCENE TO-DO
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
index 628ddc0..70ee586 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
@@ -1,5 +1,3 @@
-using NUnit.Framework;
-
 namespace Lucene.Net.Index
 {
     /*
@@ -41,506 +39,5 @@ namespace Lucene.Net.Index
         {
             return TestUtil.FieldSupportsHugeBinaryDocValues(field);
         }
-
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs b/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
index 921b719..e99678b 100644
--- a/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
@@ -1,5 +1,3 @@
-using NUnit.Framework;
-
 namespace Lucene.Net.Index
 {
     /*
@@ -25,18 +23,5 @@ namespace Lucene.Net.Index
         {
             return NewLogMergePolicy(Random());
         }
-
-        #region BaseMergePolicyTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestForceMergeNotNeeded()
-        {
-            base.TestForceMergeNotNeeded();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
index c48b98f..7f425f7 100644
--- a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
@@ -1527,7 +1527,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test, Timeout(120000)]
+        [Test]
         public virtual void TestTonsOfUpdates()
         {
             // LUCENE-5248: make sure that when there are many updates, we don't use too much RAM

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs b/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
index 7d49c1b..70c47cc 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
@@ -208,55 +208,5 @@ namespace Lucene.Net.Index
             Assert.AreEqual(0, psdp.SnapshotCount, "Should have no snapshots !");
             dir.Dispose();
         }
-
-
-        #region TestSnapshotDeletionPolicy
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestSnapshotDeletionPolicy_Mem()
-        {
-            base.TestSnapshotDeletionPolicy_Mem();
-        }
-
-        [Test]
-        public override void TestBasicSnapshots()
-        {
-            base.TestBasicSnapshots();
-        }
-
-        [Test]
-        public override void TestMultiThreadedSnapshotting()
-        {
-            base.TestMultiThreadedSnapshotting();
-        }
-
-        [Test]
-        public override void TestRollbackToOldSnapshot()
-        {
-            base.TestRollbackToOldSnapshot();
-        }
-
-        [Test]
-        public override void TestReleaseSnapshot()
-        {
-            base.TestReleaseSnapshot();
-        }
-
-        [Test]
-        public override void TestSnapshotLastCommitTwice()
-        {
-            base.TestSnapshotLastCommitTwice();
-        }
-
-        [Test]
-        public override void TestMissingCommits()
-        {
-            base.TestMissingCommits();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
index 20c6b07..427aa96 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
@@ -41,55 +41,5 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
index 31ed10c..902db7f 100644
--- a/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
@@ -47,88 +47,5 @@ namespace Lucene.Net.Index
             // and merge into newly formed 3.x segments.
             base.TestWriteReadMerge();
         }
-
-
-        #region BaseStoredFieldsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestRandomStoredFields()
-        {
-            base.TestRandomStoredFields();
-        }
-
-        [Test]
-        // LUCENE-1727: make sure doc fields are stored in order
-        public override void TestStoredFieldsOrder()
-        {
-            base.TestStoredFieldsOrder();
-        }
-
-        [Test]
-        // LUCENE-1219
-        public override void TestBinaryFieldOffsetLength()
-        {
-            base.TestBinaryFieldOffsetLength();
-        }
-
-        [Test]
-        public override void TestNumericField()
-        {
-            base.TestNumericField();
-        }
-
-        [Test]
-        public override void TestIndexedBit()
-        {
-            base.TestIndexedBit();
-        }
-
-        [Test]
-        public override void TestReadSkip()
-        {
-            base.TestReadSkip();
-        }
-
-        [Test]
-        public override void TestEmptyDocs()
-        {
-            base.TestEmptyDocs();
-        }
-
-        [Test]
-        public override void TestConcurrentReads()
-        {
-            base.TestConcurrentReads();
-        }
-
-        [Test, Timeout(120000)]
-        public override void TestBigDocuments()
-        {
-            base.TestBigDocuments();
-        }
-
-        [Test]
-        public override void TestBulkMergeWithDeletes()
-        {
-            base.TestBulkMergeWithDeletes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
index dac8fa8..38f08d4 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
@@ -58,60 +58,5 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
-
-
-
-        #region BaseTermVectorsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        // only one doc with vectors
-        public override void TestRareVectors()
-        {
-            base.TestRareVectors();
-        }
-
-        [Test]
-        public override void TestHighFreqs()
-        {
-            base.TestHighFreqs();
-        }
-
-        [Test]
-        public override void TestLotsOfFields()
-        {
-            base.TestLotsOfFields();
-        }
-
-        [Test]
-        // different options for the same field
-        public override void TestMixedOptions()
-        {
-            base.TestMixedOptions();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test]
-        public override void TestMerge()
-        {
-            base.TestMerge();
-        }
-
-        [Test]
-        // run random tests from different threads to make sure the per-thread clones
-        // don't share mutable data
-        public override void TestClone()
-        {
-            base.TestClone();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
index ede9691..922551c 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
@@ -273,19 +273,5 @@ namespace Lucene.Net.Index
 
             // TODO: Add more checks for other non-double setters!
         }
-
-
-        #region BaseMergePolicyTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestForceMergeNotNeeded()
-        {
-            base.TestForceMergeNotNeeded();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
index 16a6d17..96ec2f4 100644
--- a/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
@@ -192,7 +192,7 @@ namespace Lucene.Net.Search
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestPad()
         {
             int[] tests = new int[] { -9999999, -99560, -100, -3, -1, 0, 3, 9, 10, 1000, 999999999 };

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
index 307c51f..735dc0c 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
@@ -33,219 +33,5 @@ namespace Lucene.Net.Search.Spans
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
-
-
-        #region TestSpanExplanations
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestST1()
-        {
-            base.TestST1();
-        }
-
-        [Test]
-        public override void TestST2()
-        {
-            base.TestST2();
-        }
-
-        [Test]
-        public override void TestST4()
-        {
-            base.TestST4();
-        }
-
-        [Test]
-        public override void TestST5()
-        {
-            base.TestST5();
-        }
-
-        /* some SpanFirstQueries */
-
-        [Test]
-        public override void TestSF1()
-        {
-            base.TestSF1();
-        }
-
-        [Test]
-        public override void TestSF2()
-        {
-            base.TestSF2();
-        }
-
-        [Test]
-        public override void TestSF4()
-        {
-            base.TestSF4();
-        }
-
-        [Test]
-        public override void TestSF5()
-        {
-            base.TestSF5();
-        }
-
-        [Test]
-        public override void TestSF6()
-        {
-            base.TestSF6();
-        }
-
-        /* some SpanOrQueries */
-
-        [Test]
-        public override void TestSO1()
-        {
-            base.TestSO1();
-        }
-
-        [Test]
-        public override void TestSO2()
-        {
-            base.TestSO2();
-        }
-
-        [Test]
-        public override void TestSO3()
-        {
-            base.TestSO3();
-        }
-
-        [Test]
-        public override void TestSO4()
-        {
-            base.TestSO4();
-        }
-
-        /* some SpanNearQueries */
-
-        [Test]
-        public override void TestSNear1()
-        {
-            base.TestSNear1();
-        }
-
-        [Test]
-        public override void TestSNear2()
-        {
-            base.TestSNear2();
-        }
-
-        [Test]
-        public override void TestSNear3()
-        {
-            base.TestSNear3();
-        }
-
-        [Test]
-        public override void TestSNear4()
-        {
-            base.TestSNear4();
-        }
-
-        [Test]
-        public override void TestSNear5()
-        {
-            base.TestSNear5();
-        }
-
-        [Test]
-        public override void TestSNear6()
-        {
-            base.TestSNear6();
-        }
-
-        [Test]
-        public override void TestSNear7()
-        {
-            base.TestSNear7();
-        }
-
-        [Test]
-        public override void TestSNear8()
-        {
-            base.TestSNear8();
-        }
-
-        [Test]
-        public override void TestSNear9()
-        {
-            base.TestSNear9();
-        }
-
-        [Test]
-        public override void TestSNear10()
-        {
-            base.TestSNear10();
-        }
-
-        [Test]
-        public override void TestSNear11()
-        {
-            base.TestSNear11();
-        }
-
-        /* some SpanNotQueries */
-
-        [Test]
-        public override void TestSNot1()
-        {
-            base.TestSNot1();
-        }
-
-        [Test]
-        public override void TestSNot2()
-        {
-            base.TestSNot2();
-        }
-
-        [Test]
-        public override void TestSNot4()
-        {
-            base.TestSNot4();
-        }
-
-        [Test]
-        public override void TestSNot5()
-        {
-            base.TestSNot5();
-        }
-
-        [Test]
-        public override void TestSNot7()
-        {
-            base.TestSNot7();
-        }
-
-        [Test]
-        public override void TestSNot10()
-        {
-            base.TestSNot10();
-        }
-
-        #endregion
-
-        #region TestExplanations
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-
-        /// <summary>
-        /// Placeholder: JUnit freaks if you don't have one test ... making
-        /// class abstract doesn't help
-        /// </summary>
-        [Test]
-        public override void TestNoop()
-        {
-            base.TestNoop();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
index 18a2759..fbfe049 100644
--- a/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
@@ -33,165 +33,5 @@ namespace Lucene.Net.Search
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
-
-
-        #region TestComplexExplanations
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void Test1()
-        {
-            base.Test1();
-        }
-
-        [Test]
-        public override void Test2()
-        {
-            base.Test2();
-        }
-
-        // :TODO: we really need more crazy complex cases.
-
-        // //////////////////////////////////////////////////////////////////
-
-        // The rest of these aren't that complex, but they are <i>somewhat</i>
-        // complex, and they expose weakness in dealing with queries that match
-        // with scores of 0 wrapped in other queries
-
-        [Test]
-        public override void TestT3()
-        {
-            base.TestT3();
-        }
-
-        [Test]
-        public override void TestMA3()
-        {
-            base.TestMA3();
-        }
-
-        [Test]
-        public override void TestFQ5()
-        {
-            base.TestFQ5();
-        }
-
-        [Test]
-        public override void TestCSQ4()
-        {
-            base.TestCSQ4();
-        }
-
-        [Test]
-        public override void TestDMQ10()
-        {
-            base.TestDMQ10();
-        }
-
-        [Test]
-        public override void TestMPQ7()
-        {
-            base.TestMPQ7();
-        }
-
-        [Test]
-        public override void TestBQ12()
-        {
-            base.TestBQ12();
-        }
-
-        [Test]
-        public override void TestBQ13()
-        {
-            base.TestBQ13();
-        }
-
-        [Test]
-        public override void TestBQ18()
-        {
-            base.TestBQ18();
-        }
-
-        [Test]
-        public override void TestBQ21()
-        {
-            base.TestBQ21();
-        }
-
-        [Test]
-        public override void TestBQ22()
-        {
-            base.TestBQ22();
-        }
-
-        [Test]
-        public override void TestST3()
-        {
-            base.TestST3();
-        }
-
-        [Test]
-        public override void TestST6()
-        {
-            base.TestST6();
-        }
-
-        [Test]
-        public override void TestSF3()
-        {
-            base.TestSF3();
-        }
-
-        [Test]
-        public override void TestSF7()
-        {
-            base.TestSF7();
-        }
-
-        [Test]
-        public override void TestSNot3()
-        {
-            base.TestSNot3();
-        }
-
-        [Test]
-        public override void TestSNot6()
-        {
-            base.TestSNot6();
-        }
-
-        [Test]
-        public override void TestSNot8()
-        {
-            base.TestSNot8();
-        }
-
-        [Test]
-        public override void TestSNot9()
-        {
-            base.TestSNot9();
-        }
-
-        #endregion
-
-        #region TestExplanations
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-
-        /// <summary>
-        /// Placeholder: JUnit freaks if you don't have one test ... making
-        /// class abstract doesn't help
-        /// </summary>
-        [Test]
-        public override void TestNoop()
-        {
-            base.TestNoop();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestExplanations.cs b/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
index 18962f9..a528615 100644
--- a/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
@@ -261,7 +261,7 @@ namespace Lucene.Net.Search
         /// Placeholder: JUnit freaks if you don't have one test ... making
         /// class abstract doesn't help
         /// </summary>
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestNoop()
         {
             /* NOOP */

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
index 0a8452b..1acffbd 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
@@ -566,19 +566,5 @@ namespace Lucene.Net.Search
             reader.Dispose();
             dir.Dispose();
         }
-
-
-        #region SorterTestBase
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestPad()
-        {
-            base.TestPad();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
index 1b923a3..0fc6843 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
@@ -60,22 +60,5 @@ namespace Lucene.Net.Search
             Assert.IsFalse(a1.Equals(b));
             QueryUtils.Check(a1);
         }
-
-
-
-        #region TestSnapshotDeletionPolicy
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        /// <summary>
-        /// test a bunch of random regular expressions </summary>
-        [Test, Timeout(60000)]
-        public override void TestRegexps()
-        {
-            base.TestRegexps();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
index 7f95d2a..f52d360 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
@@ -551,19 +551,5 @@ namespace Lucene.Net.Search
             result = search.Search(Csrq("rand", maxRP, null, T, F), null, numDocs).ScoreDocs;
             AssertEquals("max,nul,T,T", 1, result.Length);
         }
-
-
-        #region SorterTestBase
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestPad()
-        {
-            base.TestPad();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
index ee990c1..6b45673 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
@@ -33,457 +33,5 @@ namespace Lucene.Net.Search
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
-
-
-        #region TestSimpleExplanations
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestT1()
-        {
-            base.TestT1();
-        }
-
-        [Test]
-        public override void TestT2()
-        {
-            base.TestT2();
-        }
-
-        /* MatchAllDocs */
-
-        [Test]
-        public override void TestMA1()
-        {
-            base.TestMA1();
-        }
-
-        [Test]
-        public override void TestMA2()
-        {
-            base.TestMA2();
-        }
-
-        /* some simple phrase tests */
-
-        [Test]
-        public override void TestP1()
-        {
-            base.TestP1();
-        }
-
-        [Test]
-        public override void TestP2()
-        {
-            base.TestP2();
-        }
-
-        [Test]
-        public override void TestP3()
-        {
-            base.TestP3();
-        }
-
-        [Test]
-        public override void TestP4()
-        {
-            base.TestP4();
-        }
-
-        [Test]
-        public override void TestP5()
-        {
-            base.TestP5();
-        }
-
-        [Test]
-        public override void TestP6()
-        {
-            base.TestP6();
-        }
-
-        [Test]
-        public override void TestP7()
-        {
-            base.TestP7();
-        }
-
-        /* some simple filtered query tests */
-
-        [Test]
-        public override void TestFQ1()
-        {
-            base.TestFQ1();
-        }
-
-        [Test]
-        public override void TestFQ2()
-        {
-            base.TestFQ2();
-        }
-
-        [Test]
-        public override void TestFQ3()
-        {
-            base.TestFQ3();
-        }
-
-        [Test]
-        public override void TestFQ4()
-        {
-            base.TestFQ4();
-        }
-
-        [Test]
-        public override void TestFQ6()
-        {
-            base.TestFQ6();
-        }
-
-        /* ConstantScoreQueries */
-
-        [Test]
-        public override void TestCSQ1()
-        {
-            base.TestCSQ1();
-        }
-
-        [Test]
-        public override void TestCSQ2()
-        {
-            base.TestCSQ2();
-        }
-
-        [Test]
-        public override void TestCSQ3()
-        {
-            base.TestCSQ3();
-        }
-
-        /* DisjunctionMaxQuery */
-
-        [Test]
-        public override void TestDMQ1()
-        {
-            base.TestDMQ1();
-        }
-
-        [Test]
-        public override void TestDMQ2()
-        {
-            base.TestDMQ2();
-        }
-
-        [Test]
-        public override void TestDMQ3()
-        {
-            base.TestDMQ3();
-        }
-
-        [Test]
-        public override void TestDMQ4()
-        {
-            base.TestDMQ4();
-        }
-
-        [Test]
-        public override void TestDMQ5()
-        {
-            base.TestDMQ5();
-        }
-
-        [Test]
-        public override void TestDMQ6()
-        {
-            base.TestDMQ6();
-        }
-
-        [Test]
-        public override void TestDMQ7()
-        {
-            base.TestDMQ7();
-        }
-
-        [Test]
-        public override void TestDMQ8()
-        {
-            base.TestDMQ8();
-        }
-
-        [Test]
-        public override void TestDMQ9()
-        {
-            base.TestDMQ9();
-        }
-
-        /* MultiPhraseQuery */
-
-        [Test]
-        public override void TestMPQ1()
-        {
-            base.TestMPQ1();
-        }
-
-        [Test]
-        public override void TestMPQ2()
-        {
-            base.TestMPQ2();
-        }
-
-        [Test]
-        public override void TestMPQ3()
-        {
-            base.TestMPQ3();
-        }
-
-        [Test]
-        public override void TestMPQ4()
-        {
-            base.TestMPQ4();
-        }
-
-        [Test]
-        public override void TestMPQ5()
-        {
-            base.TestMPQ5();
-        }
-
-        [Test]
-        public override void TestMPQ6()
-        {
-            base.TestMPQ6();
-        }
-
-        /* some simple tests of boolean queries containing term queries */
-
-        [Test]
-        public override void TestBQ1()
-        {
-            base.TestBQ1();
-        }
-
-        [Test]
-        public override void TestBQ2()
-        {
-            base.TestBQ2();
-        }
-
-        [Test]
-        public override void TestBQ3()
-        {
-            base.TestBQ3();
-        }
-
-        [Test]
-        public override void TestBQ4()
-        {
-            base.TestBQ4();
-        }
-
-        [Test]
-        public override void TestBQ5()
-        {
-            base.TestBQ5();
-        }
-
-        [Test]
-        public override void TestBQ6()
-        {
-            base.TestBQ6();
-        }
-
-        [Test]
-        public override void TestBQ7()
-        {
-            base.TestBQ7();
-        }
-
-        [Test]
-        public override void TestBQ8()
-        {
-            base.TestBQ8();
-        }
-
-        [Test]
-        public override void TestBQ9()
-        {
-            base.TestBQ9();
-        }
-
-        [Test]
-        public override void TestBQ10()
-        {
-            base.TestBQ10();
-        }
-
-        [Test]
-        public override void TestBQ11()
-        {
-            base.TestBQ11();
-        }
-
-        [Test]
-        public override void TestBQ14()
-        {
-            base.TestBQ14();
-        }
-
-        [Test]
-        public override void TestBQ15()
-        {
-            base.TestBQ15();
-        }
-
-        [Test]
-        public override void TestBQ16()
-        {
-            base.TestBQ16();
-        }
-
-        [Test]
-        public override void TestBQ17()
-        {
-            base.TestBQ17();
-        }
-
-        [Test]
-        public override void TestBQ19()
-        {
-            base.TestBQ19();
-        }
-
-        [Test]
-        public override void TestBQ20()
-        {
-            base.TestBQ20();
-        }
-
-        /* BQ of TQ: using alt so some fields have zero boost and some don't */
-
-        [Test]
-        public override void TestMultiFieldBQ1()
-        {
-            base.TestMultiFieldBQ1();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ2()
-        {
-            base.TestMultiFieldBQ2();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ3()
-        {
-            base.TestMultiFieldBQ3();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ4()
-        {
-            base.TestMultiFieldBQ4();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ5()
-        {
-            base.TestMultiFieldBQ5();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ6()
-        {
-            base.TestMultiFieldBQ6();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ7()
-        {
-            base.TestMultiFieldBQ7();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ8()
-        {
-            base.TestMultiFieldBQ8();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ9()
-        {
-            base.TestMultiFieldBQ9();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQ10()
-        {
-            base.TestMultiFieldBQ10();
-        }
-
-        /* BQ of PQ: using alt so some fields have zero boost and some don't */
-
-        [Test]
-        public override void TestMultiFieldBQofPQ1()
-        {
-            base.TestMultiFieldBQofPQ1();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQofPQ2()
-        {
-            base.TestMultiFieldBQofPQ2();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQofPQ3()
-        {
-            base.TestMultiFieldBQofPQ3();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQofPQ4()
-        {
-            base.TestMultiFieldBQofPQ4();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQofPQ5()
-        {
-            base.TestMultiFieldBQofPQ5();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQofPQ6()
-        {
-            base.TestMultiFieldBQofPQ6();
-        }
-
-        [Test]
-        public override void TestMultiFieldBQofPQ7()
-        {
-            base.TestMultiFieldBQofPQ7();
-        }
-
-        #endregion
-
-        #region TestExplanations
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-
-        /// <summary>
-        /// Placeholder: JUnit freaks if you don't have one test ... making
-        /// class abstract doesn't help
-        /// </summary>
-        [Test]
-        public override void TestNoop()
-        {
-            base.TestNoop();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
index f8c9fb3..bb1c4d0 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
@@ -177,19 +177,5 @@ namespace Lucene.Net.Search
             result = search.Search(q, TermRangeFilter.NewStringRange("rand", maxRP, null, T, F), numDocs).ScoreDocs;
             Assert.AreEqual(1, result.Length, "max,nul,T,T");
         }
-
-
-        #region SorterTestBase
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestPad()
-        {
-            base.TestPad();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
index 51ac7e2..dd31909 100644
--- a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
+++ b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
@@ -153,55 +153,55 @@ namespace Lucene.Net.Util
             DoTest(strategy, Random().Next(20000));
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestEmpty()
         {
             SortTest(new Entry[0]);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestOne()
         {
             DoTest(RandomStrategy, 1);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwo()
         {
             DoTest(RandomStrategy, 2);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestRandom()
         {
             DoTest(RandomStrategy);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestRandomLowCardinality()
         {
             DoTest(RandomLowCardinalityStrategy, 2);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestAscending()
         {
             DoTest(AscendingStrategy, 2);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestAscendingSequences()
         {
             DoTest(AscendingSequencesStrategy, 2);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestDescending()
         {
             DoTest(DescendingStrategy, 2);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestStrictlyDescendingStrategy()
         {
             DoTest(StrictlyDescendingStrategy, 2);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
index 38d63a1..91c7062 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using NUnit.Framework;
 using System.Collections;
 using System.Diagnostics;
 
@@ -76,49 +75,5 @@ namespace Lucene.Net.Util.Packed
                 return SlowAdvance(target);
             }
         }
-
-
-        #region BaseDocIdSetTestCase<T>
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        /// <summary>
-        /// Test length=0.
-        /// </summary>
-        [Test]
-        public override void TestNoBit()
-        {
-            base.TestNoBit();
-        }
-
-        /// <summary>
-        /// Test length=1.
-        /// </summary>
-        [Test]
-        public override void Test1Bit()
-        {
-            base.Test1Bit();
-        }
-
-        /// <summary>
-        /// Test length=2.
-        /// </summary>
-        [Test]
-        public override void Test2Bits()
-        {
-            base.Test2Bits();
-        }
-
-        /// <summary>
-        /// Compare the content of the set against a <seealso cref="BitSet"/>.
-        /// </summary>
-        [Test]
-        public override void TestAgainstBitSet()
-        {
-            base.TestAgainstBitSet();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
index bb779c5..1294bff 100644
--- a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
@@ -1,5 +1,3 @@
-using Lucene.Net.Attributes;
-using NUnit.Framework;
 using System.Collections;
 
 namespace Lucene.Net.Util
@@ -27,49 +25,5 @@ namespace Lucene.Net.Util
         {
             return new DocIdBitSet((BitArray)bs.Clone());
         }
-
-
-        #region BaseDocIdSetTestCase<T>
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        /// <summary>
-        /// Test length=0.
-        /// </summary>
-        [Test]
-        public override void TestNoBit()
-        {
-            base.TestNoBit();
-        }
-
-        /// <summary>
-        /// Test length=1.
-        /// </summary>
-        [Test]
-        public override void Test1Bit()
-        {
-            base.Test1Bit();
-        }
-
-        /// <summary>
-        /// Test length=2.
-        /// </summary>
-        [Test]
-        public override void Test2Bits()
-        {
-            base.Test2Bits();
-        }
-
-        /// <summary>
-        /// Compare the content of the set against a <seealso cref="BitSet"/>.
-        /// </summary>
-        [Test, LongRunningTest, Timeout(150000)]
-        public override void TestAgainstBitSet()
-        {
-            base.TestAgainstBitSet();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
index 2f822f9..550b3e1 100644
--- a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
@@ -1,5 +1,4 @@
 using System;
-using Lucene.Net.Attributes;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
 using NUnit.Framework;
@@ -511,49 +510,5 @@ namespace Lucene.Net.Util
             Assert.IsTrue(bits.Get(1));
             Assert.IsFalse(newBits.Get(1));
         }
-
-
-        #region BaseDocIdSetTestCase<T>
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        /// <summary>
-        /// Test length=0.
-        /// </summary>
-        [Test]
-        public override void TestNoBit()
-        {
-            base.TestNoBit();
-        }
-
-        /// <summary>
-        /// Test length=1.
-        /// </summary>
-        [Test]
-        public override void Test1Bit()
-        {
-            base.Test1Bit();
-        }
-
-        /// <summary>
-        /// Test length=2.
-        /// </summary>
-        [Test]
-        public override void Test2Bits()
-        {
-            base.Test2Bits();
-        }
-
-        /// <summary>
-        /// Compare the content of the set against a <seealso cref="BitSet"/>.
-        /// </summary>
-        [Test, LongRunningTest, Timeout(150000)]
-        public override void TestAgainstBitSet()
-        {
-            base.TestAgainstBitSet();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
index 3649531..5c35706 100644
--- a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
@@ -1,5 +1,3 @@
-using NUnit.Framework;
-
 namespace Lucene.Net.Util
 {
     /*
@@ -34,67 +32,5 @@ namespace Lucene.Net.Util
         {
             return new ArrayInPlaceMergeSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
         }
-
-
-        #region BaseSortTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestEmpty()
-        {
-            base.TestEmpty();
-        }
-
-        [Test]
-        public override void TestOne()
-        {
-            base.TestOne();
-        }
-
-        [Test]
-        public override void TestTwo()
-        {
-            base.TestTwo();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test]
-        public override void TestRandomLowCardinality()
-        {
-            base.TestRandomLowCardinality();
-        }
-
-        [Test]
-        public override void TestAscending()
-        {
-            base.TestAscending();
-        }
-
-        [Test]
-        public override void TestAscendingSequences()
-        {
-            base.TestAscendingSequences();
-        }
-
-        [Test]
-        public override void TestDescending()
-        {
-            base.TestDescending();
-        }
-
-        [Test]
-        public override void TestStrictlyDescendingStrategy()
-        {
-            base.TestStrictlyDescendingStrategy();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
index b2c75f8..c71893a 100644
--- a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
@@ -1,5 +1,3 @@
-using NUnit.Framework;
-
 namespace Lucene.Net.Util
 {
     /*
@@ -30,67 +28,5 @@ namespace Lucene.Net.Util
         {
             return new ArrayIntroSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
         }
-
-
-        #region BaseSortTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestEmpty()
-        {
-            base.TestEmpty();
-        }
-
-        [Test]
-        public override void TestOne()
-        {
-            base.TestOne();
-        }
-
-        [Test]
-        public override void TestTwo()
-        {
-            base.TestTwo();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test]
-        public override void TestRandomLowCardinality()
-        {
-            base.TestRandomLowCardinality();
-        }
-
-        [Test]
-        public override void TestAscending()
-        {
-            base.TestAscending();
-        }
-
-        [Test]
-        public override void TestAscendingSequences()
-        {
-            base.TestAscendingSequences();
-        }
-
-        [Test]
-        public override void TestDescending()
-        {
-            base.TestDescending();
-        }
-
-        [Test]
-        public override void TestStrictlyDescendingStrategy()
-        {
-            base.TestStrictlyDescendingStrategy();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
index 8144d1c..c72aa45 100644
--- a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
@@ -514,49 +514,5 @@ namespace Lucene.Net.Util
             bits.FastSet(bit - 1);
             Assert.IsTrue(bits.FastGet(bit - 1));
         }
-
-
-        #region BaseDocIdSetTestCase<T>
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        /// <summary>
-        /// Test length=0.
-        /// </summary>
-        [Test]
-        public override void TestNoBit()
-        {
-            base.TestNoBit();
-        }
-
-        /// <summary>
-        /// Test length=1.
-        /// </summary>
-        [Test]
-        public override void Test1Bit()
-        {
-            base.Test1Bit();
-        }
-
-        /// <summary>
-        /// Test length=2.
-        /// </summary>
-        [Test]
-        public override void Test2Bits()
-        {
-            base.Test2Bits();
-        }
-
-        /// <summary>
-        /// Compare the content of the set against a <seealso cref="BitSet"/>.
-        /// </summary>
-        [Test, LongRunningTest, Timeout(150000)]
-        public override void TestAgainstBitSet()
-        {
-            base.TestAgainstBitSet();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
index b310b7b..3c92150 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
@@ -38,49 +38,5 @@ namespace Lucene.Net.Util
             base.AssertEquals(numBits, ds1, ds2);
             Assert.AreEqual(ds1.Cardinality(), ds2.Cardinality());
         }
-
-
-        #region BaseDocIdSetTestCase<T>
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        /// <summary>
-        /// Test length=0.
-        /// </summary>
-        [Test]
-        public override void TestNoBit()
-        {
-            base.TestNoBit();
-        }
-
-        /// <summary>
-        /// Test length=1.
-        /// </summary>
-        [Test]
-        public override void Test1Bit()
-        {
-            base.Test1Bit();
-        }
-
-        /// <summary>
-        /// Test length=2.
-        /// </summary>
-        [Test]
-        public override void Test2Bits()
-        {
-            base.Test2Bits();
-        }
-
-        /// <summary>
-        /// Compare the content of the set against a <seealso cref="BitSet"/>.
-        /// </summary>
-        [Test]
-        public override void TestAgainstBitSet()
-        {
-            base.TestAgainstBitSet();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
index 8f13308..c12b850 100644
--- a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
@@ -1,5 +1,3 @@
-using NUnit.Framework;
-
 namespace Lucene.Net.Util
 {
     /*
@@ -30,67 +28,5 @@ namespace Lucene.Net.Util
         {
             return new ArrayTimSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>(), TestUtil.NextInt(Random(), 0, arr.Length));
         }
-
-
-        #region BaseSortTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestEmpty()
-        {
-            base.TestEmpty();
-        }
-
-        [Test]
-        public override void TestOne()
-        {
-            base.TestOne();
-        }
-
-        [Test]
-        public override void TestTwo()
-        {
-            base.TestTwo();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test]
-        public override void TestRandomLowCardinality()
-        {
-            base.TestRandomLowCardinality();
-        }
-
-        [Test]
-        public override void TestAscending()
-        {
-            base.TestAscending();
-        }
-
-        [Test]
-        public override void TestAscendingSequences()
-        {
-            base.TestAscendingSequences();
-        }
-
-        [Test]
-        public override void TestDescending()
-        {
-            base.TestDescending();
-        }
-
-        [Test]
-        public override void TestStrictlyDescendingStrategy()
-        {
-            base.TestStrictlyDescendingStrategy();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
index b0d3ea0..73d338d 100644
--- a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
@@ -106,49 +106,5 @@ namespace Lucene.Net.Util
             }
             AssertEquals(numBits, expected, union);
         }
-
-
-        #region BaseDocIdSetTestCase<T>
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        /// <summary>
-        /// Test length=0.
-        /// </summary>
-        [Test]
-        public override void TestNoBit()
-        {
-            base.TestNoBit();
-        }
-
-        /// <summary>
-        /// Test length=1.
-        /// </summary>
-        [Test]
-        public override void Test1Bit()
-        {
-            base.Test1Bit();
-        }
-
-        /// <summary>
-        /// Test length=2.
-        /// </summary>
-        [Test]
-        public override void Test2Bits()
-        {
-            base.Test2Bits();
-        }
-
-        /// <summary>
-        /// Compare the content of the set against a <seealso cref="BitSet"/>.
-        /// </summary>
-        [Test]
-        public override void TestAgainstBitSet()
-        {
-            base.TestAgainstBitSet();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file


[05/50] [abbrv] lucenenet git commit: Added LuceneNetSpecific attribute to Core.Util.TestOpenBitSet.TestClearSmall() and Core.Util.TestOpenBitSet.TestClearLarge()

Posted by ni...@apache.org.
Added LuceneNetSpecific attribute to Core.Util.TestOpenBitSet.TestClearSmall() and Core.Util.TestOpenBitSet.TestClearLarge()


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

Branch: refs/heads/master
Commit: 335c1a8b358e7cbf81fe0d417dfdf678531f84d3
Parents: 5c4cffd
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 05:30:55 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:51 2016 +0700

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


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/335c1a8b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
index ae5afd7..8144d1c 100644
--- a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
@@ -345,7 +345,7 @@ namespace Lucene.Net.Util
             DoRandomSets(AtLeast(1200), AtLeast(1000), 2);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public void TestClearSmall()
         {
             OpenBitSet a = new OpenBitSet(30);   // 0110010111001000101101001001110...0
@@ -374,7 +374,7 @@ namespace Lucene.Net.Util
             Assert.True(a.Equals(b));
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public void TestClearLarge()
         {
             int iters = AtLeast(1000);


[16/50] [abbrv] lucenenet git commit: Removed fail assertion in Core.Index.TestIndexWriterUnicode because the test now finishes.

Posted by ni...@apache.org.
Removed fail assertion in Core.Index.TestIndexWriterUnicode because the test now finishes.


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

Branch: refs/heads/master
Commit: f9589119b15f776975b7c9ea77e6496494dd55eb
Parents: 575630d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 10:20:54 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:55 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestIndexWriterUnicode.cs | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9589119/src/Lucene.Net.Tests/core/Index/TestIndexWriterUnicode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterUnicode.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterUnicode.cs
index 003c6cc..f3495c0 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterUnicode.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterUnicode.cs
@@ -286,8 +286,6 @@ namespace Lucene.Net.Index
         [Test]
         public virtual void TestInvalidUTF16()
         {
-            fail("Test has infinite recursion");
-
             Directory dir = NewDirectory();
             IndexWriter w = new IndexWriter(dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new TestIndexWriter.StringSplitAnalyzer()));
             Document doc = new Document();


[47/50] [abbrv] lucenenet git commit: Ported Analysis.Stempel + tests (closes #190)

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Core/Support/DataOutputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/DataOutputStream.cs b/src/Lucene.Net.Core/Support/DataOutputStream.cs
new file mode 100644
index 0000000..518dba7
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/DataOutputStream.cs
@@ -0,0 +1,256 @@
+\ufeffusing System;
+using System.IO;
+using System.Runtime.CompilerServices;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Java's DataOutputStream is similar to .NET's BinaryWriter. However, it writes
+    /// in a modified UTF-8 format that cannot be read (or duplicated) using BinaryWriter.
+    /// This is a port of DataOutputStream that is fully compatible with Java's DataInputStream.
+    /// </summary>
+    public class DataOutputStream : IDataOutput, IDisposable
+    {
+        
+        /// <summary>
+        /// The number of bytes written to the data output stream so far.
+        /// If this counter overflows, it will be wrapped to <see cref="int.MaxValue"/>.
+        /// </summary>
+        protected int written;
+
+        /// <summary>
+        /// bytearr is initialized on demand by writeUTF
+        /// </summary>
+        private byte[] bytearr = null;
+
+
+        private readonly Stream @out;
+
+        /// <summary>
+        /// Creates a new data output stream to write data to the specified
+        /// underlying output stream. The counter <code>written</code> is
+        /// set to zero.
+        /// </summary>
+        /// <param name="out">the underlying output stream, to be saved for later use.</param>
+        public DataOutputStream(Stream @out)
+        {
+            this.@out = @out;
+        }
+
+        /// <summary>
+        /// Increases the written counter by the specified value
+        /// until it reaches <see cref="int.MaxValue"/>.
+        /// </summary>
+        private void IncCount(int value)
+        {
+            int temp = written + value;
+            if (temp < 0)
+            {
+                temp = int.MaxValue;
+            }
+            written = temp;
+        }
+
+        /// <summary>
+        /// Writes the specified byte (the low eight bits of the argument
+        /// <code>b</code>) to the underlying output stream.If no exception
+        /// is thrown, the counter<code>written</code> is incremented by
+        /// <code>1</code>.
+        /// </summary>
+        /// <param name="b">the <code>byte</code> to be written.</param>
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        public virtual void Write(int b) 
+        {
+            @out.WriteByte((byte)b);
+            IncCount(1);
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        public virtual void Write(byte[] b, int off, int len)
+        {
+            @out.Write(b, off, len);
+            IncCount(len);
+        }
+
+        public virtual void Flush() 
+        {
+            @out.Flush();
+        }
+
+        public void WriteBoolean(bool v)
+        {
+            @out.WriteByte((byte)(v ? 1 : 0));
+            IncCount(1);
+        }
+
+        public void WriteByte(int v)
+        {
+            @out.WriteByte((byte)v);
+            IncCount(1);
+        }
+
+        public void WriteShort(int v)
+        {
+            @out.WriteByte((byte)((int)((uint)v >> 8) & 0xFF));
+            @out.WriteByte((byte)((int)((uint)v >> 0) & 0xFF));
+            IncCount(2);
+        }
+
+        public void WriteChar(int v)
+        {
+            @out.WriteByte((byte)((int)((uint)v >> 8) & 0xFF));
+            @out.WriteByte((byte)((int)((uint)v >> 0) & 0xFF));
+            IncCount(2);
+        }
+
+        public void WriteInt(int v)
+        {
+            @out.WriteByte((byte)(int)(((uint)v >> 24) & 0xFF));
+            @out.WriteByte((byte)(int)(((uint)v >> 16) & 0xFF));
+            @out.WriteByte((byte)(int)(((uint)v >>  8) & 0xFF));
+            @out.WriteByte((byte)(int)(((uint)v >>  0) & 0xFF));
+            IncCount(4);
+        }
+
+        private byte[] writeBuffer = new byte[8];
+
+        public void WriteLong(long v)
+        {
+            writeBuffer[0] = (byte)(long)((ulong)v >> 56);
+            writeBuffer[1] = (byte)(long)((ulong)v >> 48);
+            writeBuffer[2] = (byte)(long)((ulong)v >> 40);
+            writeBuffer[3] = (byte)(long)((ulong)v >> 32);
+            writeBuffer[4] = (byte)(long)((ulong)v >> 24);
+            writeBuffer[5] = (byte)(long)((ulong)v >> 16);
+            writeBuffer[6] = (byte)(long)((ulong)v >> 8);
+            writeBuffer[7] = (byte)(long)((ulong)v >> 0);
+            @out.Write(writeBuffer, 0, 8);
+            IncCount(8);
+        }
+
+        public void WriteFloat(float v)
+        {
+            WriteInt(Number.FloatToIntBits(v));
+        }
+
+        public void WriteDouble(double v)
+        {
+            WriteLong(Number.DoubleToLongBits(v));
+        }
+
+        public void WriteBytes(string s)
+        {
+            int len = s.Length;
+            for (int i = 0; i < len; i++)
+            {
+                @out.WriteByte((byte)s[i]);
+            }
+            IncCount(len);
+        }
+
+        public void WriteChars(string s)
+        {
+            int len = s.Length;
+            for (int i = 0; i < len; i++)
+            {
+                int v = s[i];
+                @out.WriteByte((byte)(int)(((uint)v >> 8) & 0xFF));
+                @out.WriteByte((byte)(int)(((uint)v >> 0) & 0xFF));
+            }
+            IncCount(len * 2);
+        }
+
+        public void WriteUTF(string str) 
+        {
+            WriteUTF(str, this);
+        }
+
+        internal static int WriteUTF(string str, IDataOutput @out)
+        {
+            int strlen = str.Length;
+            int utflen = 0;
+            int c, count = 0;
+
+            /* use charAt instead of copying String to char array */
+            for (int i = 0; i < strlen; i++)
+            {
+                c = str[i];
+                if ((c >= 0x0001) && (c <= 0x007F))
+                {
+                    utflen++;
+                }
+                else if (c > 0x07FF)
+                {
+                    utflen += 3;
+                }
+                else
+                {
+                    utflen += 2;
+                }
+            }
+
+            if (utflen > 65535)
+                throw new FormatException(
+                    "encoded string too long: " + utflen + " bytes");
+
+            byte[] bytearr = null;
+            if (@out is DataOutputStream) {
+                DataOutputStream dos = (DataOutputStream)@out;
+                if (dos.bytearr == null || (dos.bytearr.Length < (utflen + 2)))
+                    dos.bytearr = new byte[(utflen * 2) + 2];
+                bytearr = dos.bytearr;
+            } else {
+                bytearr = new byte[utflen + 2];
+            }
+
+            bytearr[count++] = (byte)(int)(((uint)utflen >> 8) & 0xFF);
+            bytearr[count++] = (byte)(int)(((uint)utflen >> 0) & 0xFF);
+
+            int i2 = 0;
+            for (i2 = 0; i2 < strlen; i2++)
+            {
+                c = str[i2];
+                if (!((c >= 0x0001) && (c <= 0x007F))) break;
+                bytearr[count++] = (byte)c;
+            }
+
+            for (; i2 < strlen; i2++)
+            {
+                c = str[i2];
+                if ((c >= 0x0001) && (c <= 0x007F))
+                {
+                    bytearr[count++] = (byte)c;
+
+                }
+                else if (c > 0x07FF)
+                {
+                    bytearr[count++] = (byte)(0xE0 | ((c >> 12) & 0x0F));
+                    bytearr[count++] = (byte)(0x80 | ((c >> 6) & 0x3F));
+                    bytearr[count++] = (byte)(0x80 | ((c >> 0) & 0x3F));
+                }
+                else
+                {
+                    bytearr[count++] = (byte)(0xC0 | ((c >> 6) & 0x1F));
+                    bytearr[count++] = (byte)(0x80 | ((c >> 0) & 0x3F));
+                }
+            }
+            @out.Write(bytearr, 0, utflen + 2);
+            return utflen + 2;
+        }
+
+
+        #region From FilterOutputStream
+
+        public void Write(byte[] b)
+        {
+            Write(b, 0, b.Length);
+        }
+
+        public void Dispose()
+        {
+            @out.Dispose();
+        }
+
+        #endregion
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Core/Support/IDataInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/IDataInput.cs b/src/Lucene.Net.Core/Support/IDataInput.cs
new file mode 100644
index 0000000..40d56cf
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/IDataInput.cs
@@ -0,0 +1,24 @@
+\ufeffnamespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Equivalent to Java's DataInput interface
+    /// </summary>
+    public interface IDataInput
+    {
+        void ReadFully(byte[] b);
+        void ReadFully(byte[] b, int off, int len);
+        int SkipBytes(int n);
+        bool ReadBoolean();
+        byte ReadByte();
+        int ReadUnsignedByte();
+        short ReadShort();
+        int ReadUnsignedShort();
+        char ReadChar();
+        int ReadInt();
+        long ReadLong();
+        float ReadFloat();
+        double ReadDouble();
+        string ReadLine();
+        string ReadUTF();
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Core/Support/IDataOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/IDataOutput.cs b/src/Lucene.Net.Core/Support/IDataOutput.cs
new file mode 100644
index 0000000..6f81351
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/IDataOutput.cs
@@ -0,0 +1,23 @@
+\ufeffnamespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Equivalent to Java's DataOutut interface
+    /// </summary>
+    public interface IDataOutput
+    {
+        void Write(int b);
+        void Write(byte[] b);
+        void Write(byte[] b, int off, int len);
+        void WriteBoolean(bool v);
+        void WriteByte(int v);
+        void WriteShort(int v);
+        void WriteChar(int v);
+        void WriteInt(int v);
+        void WriteLong(long v);
+        void WriteFloat(float v);
+        void WriteDouble(double v);
+        void WriteBytes(string s);
+        void WriteChars(string s);
+        void WriteUTF(string s);
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs
new file mode 100644
index 0000000..1c0efc3
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestCompile.cs
@@ -0,0 +1,211 @@
+\ufeffusing Lucene.Net.Support;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.IO;
+using System.Text;
+
+/*
+ Egothor Software License version 1.00
+ Copyright (C) 1997-2004 Leo Galambos.
+ Copyright (C) 2002-2004 "Egothor developers"
+ on behalf of the Egothor Project.
+ All rights reserved.
+
+ This  software  is  copyrighted  by  the "Egothor developers". If this
+ license applies to a single file or document, the "Egothor developers"
+ are the people or entities mentioned as copyright holders in that file
+ or  document.  If  this  license  applies  to the Egothor project as a
+ whole,  the  copyright holders are the people or entities mentioned in
+ the  file CREDITS. This file can be found in the same location as this
+ license in the distribution.
+
+ Redistribution  and  use  in  source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ 1. Redistributions  of  source  code  must retain the above copyright
+ notice, the list of contributors, this list of conditions, and the
+ following disclaimer.
+ 2. Redistributions  in binary form must reproduce the above copyright
+ notice, the list of contributors, this list of conditions, and the
+ disclaimer  that  follows  these  conditions  in the documentation
+ and/or other materials provided with the distribution.
+ 3. The name "Egothor" must not be used to endorse or promote products
+ derived  from  this software without prior written permission. For
+ written permission, please contact Leo.G@seznam.cz
+ 4. Products  derived  from this software may not be called "Egothor",
+ nor  may  "Egothor"  appear  in  their name, without prior written
+ permission from Leo.G@seznam.cz.
+
+ In addition, we request that you include in the end-user documentation
+ provided  with  the  redistribution  and/or  in the software itself an
+ acknowledgement equivalent to the following:
+ "This product includes software developed by the Egothor Project.
+ http://egothor.sf.net/"
+
+ THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+ FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+ CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+ BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This  software  consists  of  voluntary  contributions  made  by  many
+ individuals  on  behalf  of  the  Egothor  Project  and was originally
+ created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    public class TestCompile_ : LuceneTestCase
+    {
+        private const string RULES_FILE = "Lucene.Net.Tests.Analysis.Stempel.Egothor.Stemmer.testRules.txt";
+
+        [Test]
+        public void TestCompile()
+        {
+            DirectoryInfo dir = CreateTempDir("testCompile");
+            dir.Create();
+            FileInfo output;
+            using (Stream input = GetType().Assembly.GetManifestResourceStream(RULES_FILE))
+            {
+                output = new FileInfo(Path.Combine(dir.FullName, "testRules.txt"));
+                Copy(input, output);
+            }
+            string path = output.FullName;
+            Compile.Main(new string[] {"test", path });
+            string compiled = path + ".out";
+            Trie trie = LoadTrie(compiled);
+            AssertTrie(trie, path, true, true);
+            AssertTrie(trie, path, false, true);
+            new FileInfo(compiled).Delete();
+        }
+
+        [Test]
+        public void TestCompileBackwards()
+        {
+            DirectoryInfo dir = CreateTempDir("testCompile");
+            dir.Create();
+            FileInfo output;
+            using (Stream input = GetType().Assembly.GetManifestResourceStream(RULES_FILE))
+            {
+                output = new FileInfo(Path.Combine(dir.FullName, "testRules.txt"));
+                Copy(input, output);
+            }
+            string path = output.FullName;
+            Compile.Main(new string[] { "-test", path });
+            string compiled = path + ".out";
+            Trie trie = LoadTrie(compiled);
+            AssertTrie(trie, path, true, true);
+            AssertTrie(trie, path, false, true);
+            new FileInfo(compiled).Delete();
+        }
+
+        [Test]
+        public void TestCompileMulti()
+        {
+            DirectoryInfo dir = CreateTempDir("testCompile");
+            dir.Create();
+            FileInfo output;
+            using (Stream input = GetType().Assembly.GetManifestResourceStream(RULES_FILE))
+            {
+                output = new FileInfo(Path.Combine(dir.FullName, "testRules.txt"));
+                Copy(input, output);
+            }
+            string path = output.FullName;
+            Compile.Main(new string[] { "Mtest", path });
+            string compiled = path + ".out";
+            Trie trie = LoadTrie(compiled);
+            AssertTrie(trie, path, true, true);
+            AssertTrie(trie, path, false, true);
+            new FileInfo(compiled).Delete();
+        }
+
+        internal static Trie LoadTrie(string path)
+        {
+            Trie trie;
+            using (DataInputStream @is = new DataInputStream(
+                new FileStream(path, FileMode.Open, FileAccess.Read)))
+            {
+                string method = @is.ReadUTF().ToUpperInvariant();
+                if (method.IndexOf('M') < 0)
+                {
+                    trie = new Trie(@is);
+                }
+                else
+                {
+                    trie = new MultiTrie(@is);
+                }
+            }
+            return trie;
+        }
+
+        private static void AssertTrie(Trie trie, string file, bool usefull,
+            bool storeorig)
+        {
+            using (TextReader @in =
+                new StreamReader(new FileStream(file, FileMode.Open), Encoding.UTF8))
+            {
+
+                for (string line = @in.ReadLine(); line != null; line = @in.ReadLine())
+                {
+                    try
+                    {
+                        line = line.ToLowerInvariant();
+                        StringTokenizer st = new StringTokenizer(line);
+                        string stem = st.NextToken();
+                        if (storeorig)
+                        {
+                            string cmd = (usefull) ? trie.GetFully(stem) : trie
+                                .GetLastOnPath(stem);
+                            StringBuilder stm = new StringBuilder(stem);
+                            Diff.Apply(stm, cmd);
+                            assertEquals(stem.ToLowerInvariant(), stm.ToString().ToLowerInvariant());
+                        }
+                        while (st.HasMoreTokens())
+                        {
+                            string token = st.NextToken();
+                            if (token.Equals(stem))
+                            {
+                                continue;
+                            }
+                            string cmd = (usefull) ? trie.GetFully(token) : trie
+                                .GetLastOnPath(token);
+                            StringBuilder stm = new StringBuilder(token);
+                            Diff.Apply(stm, cmd);
+                            assertEquals(stem.ToLowerInvariant(), stm.ToString().ToLowerInvariant());
+                        }
+                    }
+                    catch (InvalidOperationException /*x*/)
+                    {
+                        // no base token (stem) on a line
+                    }
+                }
+
+            }
+        }
+
+        private static void Copy(Stream input, FileInfo output)
+        {
+            FileStream os = new FileStream(output.FullName, FileMode.OpenOrCreate, FileAccess.Write);
+            try
+            {
+                byte[] buffer = new byte[1024];
+                int len;
+                while ((len = input.Read(buffer, 0, buffer.Length)) > 0)
+                {
+                    os.Write(buffer, 0, len);
+                }
+            }
+            finally
+            {
+                os.Dispose();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestStemmer.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestStemmer.cs
new file mode 100644
index 0000000..c5bf1e9
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/TestStemmer.cs
@@ -0,0 +1,191 @@
+\ufeffusing Lucene.Net.Util;
+using NUnit.Framework;
+
+/*
+ Egothor Software License version 1.00
+ Copyright (C) 1997-2004 Leo Galambos.
+ Copyright (C) 2002-2004 "Egothor developers"
+ on behalf of the Egothor Project.
+ All rights reserved.
+
+ This  software  is  copyrighted  by  the "Egothor developers". If this
+ license applies to a single file or document, the "Egothor developers"
+ are the people or entities mentioned as copyright holders in that file
+ or  document.  If  this  license  applies  to the Egothor project as a
+ whole,  the  copyright holders are the people or entities mentioned in
+ the  file CREDITS. This file can be found in the same location as this
+ license in the distribution.
+
+ Redistribution  and  use  in  source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ 1. Redistributions  of  source  code  must retain the above copyright
+ notice, the list of contributors, this list of conditions, and the
+ following disclaimer.
+ 2. Redistributions  in binary form must reproduce the above copyright
+ notice, the list of contributors, this list of conditions, and the
+ disclaimer  that  follows  these  conditions  in the documentation
+ and/or other materials provided with the distribution.
+ 3. The name "Egothor" must not be used to endorse or promote products
+ derived  from  this software without prior written permission. For
+ written permission, please contact Leo.G@seznam.cz
+ 4. Products  derived  from this software may not be called "Egothor",
+ nor  may  "Egothor"  appear  in  their name, without prior written
+ permission from Leo.G@seznam.cz.
+
+ In addition, we request that you include in the end-user documentation
+ provided  with  the  redistribution  and/or  in the software itself an
+ acknowledgement equivalent to the following:
+ "This product includes software developed by the Egothor Project.
+ http://egothor.sf.net/"
+
+ THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+ FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+ CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+ BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This  software  consists  of  voluntary  contributions  made  by  many
+ individuals  on  behalf  of  the  Egothor  Project  and was originally
+ created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    public class TestStemmer : LuceneTestCase
+    {
+        [Test]
+        public void TestTrie()
+        {
+            Trie t = new Trie(true);
+
+            string[] keys = { "a", "ba", "bb", "c" };
+            string[] vals = { "1", "2", "2", "4" };
+
+            for (int i = 0; i < keys.Length; i++)
+            {
+                t.Add(keys[i], vals[i]);
+            }
+
+            assertEquals(0, t.root);
+            assertEquals(2, t.rows.Count);
+            assertEquals(3, t.cmds.Count);
+            AssertTrieContents(t, keys, vals);
+        }
+
+        [Test]
+        public void TestTrieBackwards()
+        {
+            Trie t = new Trie(false);
+
+            string[] keys = { "a", "ba", "bb", "c" };
+            string[] vals = { "1", "2", "2", "4" };
+
+            for (int i = 0; i < keys.Length; i++)
+            {
+                t.Add(keys[i], vals[i]);
+            }
+
+            AssertTrieContents(t, keys, vals);
+        }
+
+        [Test]
+        public void TestMultiTrie()
+        {
+            Trie t = new MultiTrie(true);
+
+            string[] keys = { "a", "ba", "bb", "c" };
+            string[] vals = { "1", "2", "2", "4" };
+
+            for (int i = 0; i < keys.Length; i++)
+            {
+                t.Add(keys[i], vals[i]);
+            }
+
+            AssertTrieContents(t, keys, vals);
+        }
+
+        [Test]
+        public void TestMultiTrieBackwards()
+        {
+            Trie t = new MultiTrie(false);
+
+            string[] keys = { "a", "ba", "bb", "c" };
+            string[] vals = { "1", "2", "2", "4" };
+
+            for (int i = 0; i < keys.Length; i++)
+            {
+                t.Add(keys[i], vals[i]);
+            }
+
+            AssertTrieContents(t, keys, vals);
+        }
+
+        [Test]
+        public void TestMultiTrie2()
+        {
+            Trie t = new MultiTrie2(true);
+
+            string[] keys = { "a", "ba", "bb", "c" };
+            /* 
+             * short vals won't work, see line 155 for example
+             * the IOOBE is caught (wierd), but shouldnt affect patch cmds?
+             */
+            string[] vals = { "1111", "2222", "2223", "4444" };
+
+            for (int i = 0; i < keys.Length; i++)
+            {
+                t.Add(keys[i], vals[i]);
+            }
+
+            AssertTrieContents(t, keys, vals);
+        }
+
+        [Test]
+        public void TestMultiTrie2Backwards()
+        {
+            Trie t = new MultiTrie2(false);
+
+            string[] keys = { "a", "ba", "bb", "c" };
+            /* 
+             * short vals won't work, see line 155 for example
+             * the IOOBE is caught (wierd), but shouldnt affect patch cmds?
+             */
+            string[] vals = { "1111", "2222", "2223", "4444" };
+
+            for (int i = 0; i < keys.Length; i++)
+            {
+                t.Add(keys[i], vals[i]);
+            }
+
+            AssertTrieContents(t, keys, vals);
+        }
+
+        private static void AssertTrieContents(Trie trie, string[] keys, string[] vals)
+        {
+            Trie[] tries = new Trie[] {
+                trie,
+                trie.Reduce(new Optimizer()),
+                trie.Reduce(new Optimizer2()),
+                trie.Reduce(new Gener()),
+                trie.Reduce(new Lift(true)),
+                trie.Reduce(new Lift(false))
+            };
+
+            foreach (Trie t in tries)
+            {
+                for (int i = 0; i < keys.Length; i++)
+                {
+                    assertEquals(vals[i], t.GetFully(keys[i]).ToString());
+                    assertEquals(vals[i], t.GetLastOnPath(keys[i]).ToString());
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/testRules.txt
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/testRules.txt b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/testRules.txt
new file mode 100644
index 0000000..ead2823
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Egothor.Stemmer/testRules.txt
@@ -0,0 +1,4 @@
+act acted acting actor
+walk walked walking
+wander wandered wanderer
+want wanted wanting

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj b/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
new file mode 100644
index 0000000..8be32c0
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
@@ -0,0 +1,89 @@
+\ufeff<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Lucene.Net.Tests.Analysis.Stempel</RootNamespace>
+    <AssemblyName>Lucene.Net.Tests.Analysis.Stempel</AssemblyName>
+    <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Egothor.Stemmer\TestCompile.cs" />
+    <Compile Include="Egothor.Stemmer\TestStemmer.cs" />
+    <Compile Include="Pl\TestPolishAnalyzer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Stempel\TestStempelPolishStemFilterFactory.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Lucene.Net.Analysis.Common\Lucene.Net.Analysis.Common.csproj">
+      <Project>{4add0bbc-b900-4715-9526-d871de8eea64}</Project>
+      <Name>Lucene.Net.Analysis.Common</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Lucene.Net.Analysis.Stempel\Lucene.Net.Analysis.Stempel.csproj">
+      <Project>{a76dad88-e3a5-40f9-9114-facd77bd8265}</Project>
+      <Name>Lucene.Net.Analysis.Stempel</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Lucene.Net.Core\Lucene.Net.csproj">
+      <Project>{5d4ad9be-1ffb-41ab-9943-25737971bf57}</Project>
+      <Name>Lucene.Net</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Lucene.Net.TestFramework\Lucene.Net.TestFramework.csproj">
+      <Project>{b2c0d749-ce34-4f62-a15e-00cb2ff5ddb3}</Project>
+      <Name>Lucene.Net.TestFramework</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Egothor.Stemmer\testRules.txt" />
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs
new file mode 100644
index 0000000..0bd90bf
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs
@@ -0,0 +1,102 @@
+\ufeffusing Lucene.Net.Analysis.Util;
+using NUnit.Framework;
+using System;
+using System.IO;
+
+namespace Lucene.Net.Analysis.Pl
+{
+    /*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+    public class TestPolishAnalyzer : BaseTokenStreamTestCase
+    {
+        /// <summary>
+        /// This test fails with NPE when the 
+        /// stopwords file is missing in classpath
+        /// </summary>
+        [Test]
+        public void TestResourcesAvailable()
+        {
+            new PolishAnalyzer(TEST_VERSION_CURRENT);
+        }
+
+        /// <summary>
+        /// test stopwords and stemming
+        /// </summary>
+        [Test]
+        public void TestBasics()
+        {
+            Analyzer a = new PolishAnalyzer(TEST_VERSION_CURRENT);
+            // stemming
+            CheckOneTerm(a, "studenta", "student");
+            CheckOneTerm(a, "studenci", "student");
+            // stopword
+            AssertAnalyzesTo(a, "by\u0142", new String[] { });
+        }
+
+        /// <summary>
+        /// test use of exclusion set
+        /// </summary>
+        [Test]
+        public void TestExclude()
+        {
+            CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, AsSet("studenta"), false); ;
+            Analyzer a = new PolishAnalyzer(TEST_VERSION_CURRENT,
+                PolishAnalyzer.GetDefaultStopSet(), exclusionSet);
+            CheckOneTerm(a, "studenta", "studenta");
+            CheckOneTerm(a, "studenci", "student");
+        }
+
+        /// <summary>
+        /// blast some random strings through the analyzer
+        /// </summary>
+        [Test]
+        public void TestRandomStrings()
+        {
+            CheckRandomData(Random(), new PolishAnalyzer(TEST_VERSION_CURRENT), 1000 * RANDOM_MULTIPLIER);
+        }
+
+        /// <summary>
+        /// LUCENENET specific. The original Java implementation relied on String.subSequence(int, int) to throw an IndexOutOfBoundsException 
+        /// (in .NET, it would be string.SubString(int, int) and an ArgumentOutOfRangeException). 
+        /// However, the logic was corrected for .NET to test when the argument is negative and not 
+        /// throw an exception, since exceptions are expensive and not meant for "normal"
+        /// behavior in .NET. This test case was made trying to figure out that issue (since initially an IndexOutOfRangeException,
+        /// rather than ArgumentOutOfRangeException, was in the catch block which made the TestRandomStrings test fail). 
+        /// It will trigger the behavior that cause the second substring argument to be negative 
+        /// (although that behavior no longer throws an exception).
+        /// </summary>
+        [Test]
+        public void TestOutOfRange()
+        {
+            var a = new PolishAnalyzer(TEST_VERSION_CURRENT);
+            var text = "zyaolz 96619727 p";
+            var reader = new StringReader(text);
+            int remainder = 2;
+            using (var ts = a.TokenStream("dummy", (TextReader)new MockCharFilter(reader, remainder)))
+            {
+                ts.Reset();
+
+                while (ts.IncrementToken())
+                {
+                }
+
+                ts.End();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Properties/AssemblyInfo.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5332d92
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+\ufeffusing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Lucene.Net.Tests.Analysis.Stempel")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Lucene.Net.Tests.Analysis.Stempel")]
+[assembly: AssemblyCopyright("Copyright �  2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("940a6ab1-f00a-40e2-bc1a-2898efa8c48f")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/Stempel/TestStempelPolishStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Stempel/TestStempelPolishStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Stempel/TestStempelPolishStemFilterFactory.cs
new file mode 100644
index 0000000..b6be4af
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Stempel/TestStempelPolishStemFilterFactory.cs
@@ -0,0 +1,56 @@
+\ufeffusing NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Lucene.Net.Analysis.Stempel
+{
+    /*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+    /// <summary>
+    /// Tests for <see cref="StempelPolishStemFilterFactory"/>
+    /// </summary>
+    public class TestStempelPolishStemFilterFactory : BaseTokenStreamTestCase
+    {
+        [Test]
+        public void TestBasics()
+        {
+            TextReader reader = new StringReader("studenta studenci");
+            StempelPolishStemFilterFactory factory = new StempelPolishStemFilterFactory(new Dictionary<string, string>());
+            TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+            stream = factory.Create(stream);
+            AssertTokenStreamContents(stream,
+                new string[] { "student", "student" });
+        }
+
+        /** Test that bogus arguments result in exception */
+        [Test]
+        public void TestBogusArguments()
+        {
+            try
+            {
+                new StempelPolishStemFilterFactory(new Dictionary<string, string>() { { "bogusArg", "bogusValue" } });
+                fail();
+            }
+            catch (ArgumentException expected)
+            {
+                assertTrue(expected.Message.Contains("Unknown parameters"));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Tests.Analysis.Stempel/packages.config
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/packages.config b/src/Lucene.Net.Tests.Analysis.Stempel/packages.config
new file mode 100644
index 0000000..139d513
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/packages.config
@@ -0,0 +1,4 @@
+\ufeff<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="NUnit" version="2.6.3" targetFramework="net451" />
+</packages>
\ No newline at end of file


[15/50] [abbrv] lucenenet git commit: Fixed bugs in Core.Util.Automaton where HashSets were being used within Dictionaries and are expected to be compared by contained values rather than by reference.

Posted by ni...@apache.org.
Fixed bugs in Core.Util.Automaton where HashSets were being used within Dictionaries and are expected to be compared by contained values rather than by reference.


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

Branch: refs/heads/master
Commit: a696d70079f1eb8ed2f5bd604643e70d824034fd
Parents: f958911
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 20:45:36 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:55 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Lucene.Net.csproj           |  1 +
 src/Lucene.Net.Core/Support/ValueHashSet.cs     | 68 ++++++++++++++++++++
 .../Util/Automaton/MinimizationOperations.cs    |  4 +-
 .../Util/Automaton/SpecialOperations.cs         |  2 +-
 .../Util/automaton/AutomatonTestUtil.cs         |  4 +-
 5 files changed, 74 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a696d700/src/Lucene.Net.Core/Lucene.Net.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.csproj b/src/Lucene.Net.Core/Lucene.Net.csproj
index f790de8..99729f8 100644
--- a/src/Lucene.Net.Core/Lucene.Net.csproj
+++ b/src/Lucene.Net.Core/Lucene.Net.csproj
@@ -682,6 +682,7 @@
     <Compile Include="Support\TextSupport.cs" />
     <Compile Include="Support\ThreadClass.cs" />
     <Compile Include="Support\ThreadLock.cs" />
+    <Compile Include="Support\ValueHashSet.cs" />
     <Compile Include="Support\WeakDictionary.cs" />
     <Compile Include="Util\Accountable.cs" />
     <Compile Include="Util\ArrayInPlaceMergeSorter.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a696d700/src/Lucene.Net.Core/Support/ValueHashSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/ValueHashSet.cs b/src/Lucene.Net.Core/Support/ValueHashSet.cs
new file mode 100644
index 0000000..11ecf8f
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/ValueHashSet.cs
@@ -0,0 +1,68 @@
+\ufeffusing System.Collections.Generic;
+using System.Runtime.Serialization;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Java's HashSet is unlike .NET's in that its equals() and hashcode() methods 
+    /// are setup to compare the values of the sets, where in .NET we only check that
+    /// the references are the same. <see cref="ValueHashSet{T}"/> acts more like the
+    /// HashSet type in Java by comparing the sets for value equality.
+    /// </summary>
+    /// <typeparam name="T"></typeparam>
+    public class ValueHashSet<T> : HashSet<T>
+    {
+        public ValueHashSet()
+            : base()
+        { }
+
+        public ValueHashSet(IEnumerable<T> collection)
+            : base(collection)
+        { }
+
+        public ValueHashSet(IEqualityComparer<T> comparer)
+            : base(comparer)
+        { }
+
+        public ValueHashSet(SerializationInfo info, StreamingContext context)
+            : base(info, context)
+        { }
+
+        public ValueHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
+            : base(collection, comparer)
+        { }
+
+
+        public override bool Equals(object obj)
+        {
+            if (obj == this)
+            {
+                return true;
+            }
+
+            if (!(obj is ISet<T>))
+                return false;
+            ICollection<T> c = obj as ICollection<T>;
+            if (c.Count != Count)
+                return false;
+
+            // Check to ensure the sets values are the same
+            return SetEquals(c);
+        }
+
+        public override int GetHashCode()
+        {
+            int h = 0;
+            var i = GetEnumerator();
+            while (i.MoveNext())
+            {
+                T obj = i.Current;
+                if (!EqualityComparer<T>.Default.Equals(obj, default(T)))
+                {
+                    h += obj.GetHashCode();
+                }
+            }
+            return h;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a696d700/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs b/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs
index 31ac762..f90b9ae 100644
--- a/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs
@@ -81,7 +81,7 @@ namespace Lucene.Net.Util.Automaton
             State[] states = a.NumberedStates;
             int sigmaLen = sigma.Length, statesLen = states.Length;
             List<State>[,] reverse = new List<State>[statesLen, sigmaLen];
-            HashSet<State>[] partition = new HashSet<State>[statesLen];
+            HashSet<State>[] partition = new ValueHashSet<State>[statesLen];
             List<State>[] splitblock = new List<State>[statesLen];
             int[] block = new int[statesLen];
             StateList[,] active = new StateList[statesLen, sigmaLen];
@@ -92,7 +92,7 @@ namespace Lucene.Net.Util.Automaton
             for (int q = 0; q < statesLen; q++)
             {
                 splitblock[q] = new List<State>();
-                partition[q] = new HashSet<State>();
+                partition[q] = new ValueHashSet<State>();
                 for (int x = 0; x < sigmaLen; x++)
                 {
                     active[q, x] = new StateList();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a696d700/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs b/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
index 45fbbdc..a6e4c3b 100644
--- a/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs
@@ -252,7 +252,7 @@ namespace Lucene.Net.Util.Automaton
             }
             foreach (State r in states)
             {
-                m[r] = new HashSet<Transition>();
+                m[r] = new ValueHashSet<Transition>();
                 r.accept = false;
             }
             foreach (State r in states)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a696d700/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs b/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
index 64ec473..9dd45f7 100644
--- a/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
+++ b/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
@@ -453,7 +453,7 @@ namespace Lucene.Net.Util.Automaton
             {
                 return;
             }
-            HashSet<State> initialset = new HashSet<State>();
+            HashSet<State> initialset = new ValueHashSet<State>();
             initialset.Add(a.Initial);
             DeterminizeSimple(a, initialset);
         }
@@ -488,7 +488,7 @@ namespace Lucene.Net.Util.Automaton
                 }
                 for (int n = 0; n < points.Length; n++)
                 {
-                    ISet<State> p = new HashSet<State>();
+                    ISet<State> p = new ValueHashSet<State>();
                     foreach (State q in s)
                     {
                         foreach (Transition t in q.Transitions)


[18/50] [abbrv] lucenenet git commit: Added missing random TaskScheduler overload call to TestFramework.Index.ThreadedIndexingAndSearchingTestCase.

Posted by ni...@apache.org.
Added missing random TaskScheduler overload call to TestFramework.Index.ThreadedIndexingAndSearchingTestCase.


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

Branch: refs/heads/master
Commit: 78614ee2f41ef0095305283015d59a494e496d5c
Parents: 8cd8a60
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 17 21:51:27 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:56 2016 +0700

----------------------------------------------------------------------
 .../Index/ThreadedIndexingAndSearchingTestCase.cs                 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/78614ee2/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs b/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
index 74d15c0..1531b6b 100644
--- a/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/ThreadedIndexingAndSearchingTestCase.cs
@@ -591,8 +591,7 @@ namespace Lucene.Net.Index
             Writer = new IndexWriter(Dir, conf);
             TestUtil.ReduceOpenFiles(Writer);
 
-            //TaskScheduler es = Random().NextBoolean() ? null : Executors.newCachedThreadPool(new NamedThreadFactory(testName));
-            TaskScheduler es = null;
+            TaskScheduler es = Random().NextBoolean() ? null : TaskScheduler.Default;
 
             DoAfterWriter(es);
 


[44/50] [abbrv] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
index e90b365..e49ed8d 100644
--- a/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
@@ -141,5 +141,374 @@ namespace Lucene.Net.QueryParsers.Ext
                 assertEquals("foo & bar", tquery.Term.Text());
             }
         }
+
+
+        #region TestQueryParser
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDefaultOperator()
+        {
+            base.TestDefaultOperator();
+        }
+
+        [Test]
+        public override void TestProtectedCtors()
+        {
+            base.TestProtectedCtors();
+        }
+
+        [Test]
+        public override void TestFuzzySlopeExtendability()
+        {
+            base.TestFuzzySlopeExtendability();
+        }
+
+        [Test]
+        public override void TestStarParsing()
+        {
+            base.TestStarParsing();
+        }
+
+        [Test]
+        public override void TestCustomQueryParserWildcard()
+        {
+            base.TestCustomQueryParserWildcard();
+        }
+
+        [Test]
+        public override void TestCustomQueryParserFuzzy()
+        {
+            base.TestCustomQueryParserFuzzy();
+        }
+
+        [Test]
+        public override void TestNewFieldQuery()
+        {
+            base.TestNewFieldQuery();
+        }
+
+        /// <summary>
+        /// simple synonyms test
+        /// </summary>
+        [Test]
+        public override void TestSynonyms()
+        {
+            base.TestSynonyms();
+        }
+
+        /// <summary>
+        /// forms multiphrase query
+        /// </summary>
+        [Test]
+        public override void TestSynonymsPhrase()
+        {
+            base.TestSynonymsPhrase();
+        }
+
+        /// <summary>
+        /// simple CJK synonym test
+        /// </summary>
+        [Test]
+        public override void TestCJKSynonym()
+        {
+            base.TestCJKSynonym();
+        }
+
+        /// <summary>
+        /// synonyms with default OR operator 
+        /// </summary>
+        [Test]
+        public override void TestCJKSynonymsOR()
+        {
+            base.TestCJKSynonymsOR();
+        }
+
+        /// <summary>
+        /// more complex synonyms with default OR operator
+        /// </summary>
+        [Test]
+        public override void TestCJKSynonymsOR2()
+        {
+            base.TestCJKSynonymsOR2();
+        }
+
+        /// <summary>
+        /// synonyms with default AND operator
+        /// </summary>
+        [Test]
+        public override void TestCJKSynonymsAND()
+        {
+            base.TestCJKSynonymsAND();
+        }
+
+        /// <summary>
+        /// more complex synonyms with default AND operator
+        /// </summary>
+        [Test]
+        public override void TestCJKSynonymsAND2()
+        {
+            base.TestCJKSynonymsAND2();
+        }
+
+        [Test]
+        public override void TestCJKSynonymsPhrase()
+        {
+            base.TestCJKSynonymsPhrase();
+        }
+
+        #endregion
+
+        #region QueryParserTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestCJK()
+        {
+            base.TestCJK();
+        }
+
+        [Test]
+        public override void TestCJKTerm()
+        {
+            base.TestCJKTerm();
+        }
+
+        [Test]
+        public override void TestCJKBoostedTerm()
+        {
+            base.TestCJKBoostedTerm();
+        }
+
+        [Test]
+        public override void TestCJKPhrase()
+        {
+            base.TestCJKPhrase();
+        }
+
+        [Test]
+        public override void TestCJKBoostedPhrase()
+        {
+            base.TestCJKBoostedPhrase();
+        }
+
+        [Test]
+        public override void TestCJKSloppyPhrase()
+        {
+            base.TestCJKSloppyPhrase();
+        }
+
+        [Test]
+        public override void TestAutoGeneratePhraseQueriesOn()
+        {
+            base.TestAutoGeneratePhraseQueriesOn();
+        }
+
+        [Test]
+        public override void TestSimple()
+        {
+            base.TestSimple();
+        }
+
+        [Test]
+        public override void TestOperatorVsWhitespace()
+        {
+            base.TestOperatorVsWhitespace();
+        }
+
+        [Test]
+        public override void TestPunct()
+        {
+            base.TestPunct();
+        }
+
+        [Test]
+        public override void TestSlop()
+        {
+            base.TestSlop();
+        }
+
+        [Test]
+        public override void TestNumber()
+        {
+            base.TestNumber();
+        }
+
+        [Test]
+        public override void TestWildcard()
+        {
+            base.TestWildcard();
+        }
+
+        [Test]
+        public override void TestLeadingWildcardType()
+        {
+            base.TestLeadingWildcardType();
+        }
+
+        [Test]
+        public override void TestQPA()
+        {
+            base.TestQPA();
+        }
+
+        [Test]
+        public override void TestRange()
+        {
+            base.TestRange();
+        }
+
+        [Test]
+        public override void TestRangeWithPhrase()
+        {
+            base.TestRangeWithPhrase();
+        }
+
+        [Test]
+        public override void TestDateRange()
+        {
+            base.TestDateRange();
+        }
+
+        [Test]
+        public override void TestEscaped()
+        {
+            base.TestEscaped();
+        }
+
+        [Test]
+        public override void TestEscapedVsQuestionMarkAsWildcard()
+        {
+            base.TestEscapedVsQuestionMarkAsWildcard();
+        }
+
+        [Test]
+        public override void TestQueryStringEscaping()
+        {
+            base.TestQueryStringEscaping();
+        }
+
+        [Test]
+        public override void TestTabNewlineCarriageReturn()
+        {
+            base.TestTabNewlineCarriageReturn();
+        }
+
+        [Test]
+        public override void TestSimpleDAO()
+        {
+            base.TestSimpleDAO();
+        }
+
+        [Test]
+        public override void TestBoost()
+        {
+            base.TestBoost();
+        }
+
+        [Test]
+        public override void TestException()
+        {
+            base.TestException();
+        }
+
+        [Test]
+        public override void TestBooleanQuery()
+        {
+            base.TestBooleanQuery();
+        }
+
+        [Test]
+        public override void TestPrecedence()
+        {
+            base.TestPrecedence();
+        }
+
+        [Test]
+        public override void TestEscapedWildcard()
+        {
+            base.TestEscapedWildcard();
+        }
+
+        [Test]
+        public override void TestRegexps()
+        {
+            base.TestRegexps();
+        }
+
+        [Test]
+        public override void TestStopwords()
+        {
+            base.TestStopwords();
+        }
+
+        [Test]
+        public override void TestPositionIncrement()
+        {
+            base.TestPositionIncrement();
+        }
+
+        [Test]
+        public override void TestMatchAllDocs()
+        {
+            base.TestMatchAllDocs();
+        }
+
+        // LUCENE-2002: make sure defaults for StandardAnalyzer's
+        // enableStopPositionIncr & QueryParser's enablePosIncr
+        // "match"
+        [Test]
+        public override void TestPositionIncrements()
+        {
+            base.TestPositionIncrements();
+        }
+
+        [Test]
+        public override void TestCollatedRange()
+        {
+            base.TestCollatedRange();
+        }
+
+        [Test]
+        public override void TestDistanceAsEditsParsing()
+        {
+            base.TestDistanceAsEditsParsing();
+        }
+
+        [Test]
+        public override void TestPhraseQueryToString()
+        {
+            base.TestPhraseQueryToString();
+        }
+
+        [Test]
+        public override void TestParseWildcardAndPhraseQueries()
+        {
+            base.TestParseWildcardAndPhraseQueries();
+        }
+
+        [Test]
+        public override void TestPhraseQueryPositionIncrements()
+        {
+            base.TestPhraseQueryPositionIncrements();
+        }
+
+        [Test]
+        public override void TestMatchAllQueryParsing()
+        {
+            base.TestMatchAllQueryParsing();
+        }
+
+        [Test]
+        public override void TestNestedAndClausesFoo()
+        {
+            base.TestNestedAndClausesFoo();
+        }
+
+        #endregion
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
index 37f00e2..9dcfcde 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.Compressing
             return Arrays.CopyOfRange(bytes.Bytes, bytes.Offset, bytes.Offset + bytes.Length);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDecompress()
         {
             int iterations = AtLeast(10);
@@ -103,7 +103,7 @@ namespace Lucene.Net.Codecs.Compressing
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestPartialDecompress()
         {
             int iterations = AtLeast(10);
@@ -139,19 +139,19 @@ namespace Lucene.Net.Codecs.Compressing
             return compressed;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptySequence()
         {
             Test(new byte[0]);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortSequence()
         {
             Test(new[] { (byte)Random().Next(256) });
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIncompressible()
         {
             var decompressed = new byte[RandomInts.NextIntBetween(Random(), 20, 256)];
@@ -162,7 +162,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestConstant()
         {
             var decompressed = new byte[TestUtil.NextInt(Random(), 1, 10000)];
@@ -170,7 +170,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLUCENE5201()
         {
             sbyte[] data = { 14, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 50, 64, 0, 46, -1, 0, 0, 0, 29, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 50, 64, 0, 47, -105, 0, 0, 0, 30, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, -97, 6, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68
 , -113, 0, 120, 64, 0, 48, 4, 0, 0, 0, 31, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 24, 32, 34, 124, 0, 120, 64, 0, 48, 80, 0, 0, 0, 31, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 
 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 7
 2, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 50, 64, 0, 49, 20, 0, 0, 0, 32, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 50, 64, 0, 50, 53, 0, 0, 0, 34, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0
 , 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 50, 64, 0, 51, 85, 0, 0, 0, 36, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, -97, 5, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 50, -64, 0, 51, -45, 0, 0, 0, 37, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -9
 7, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 120, 64, 0, 52, -88, 0, 0, 0, 39, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, -19, -24, -101, -35 };

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
index feb57d0..334ae8d 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.Compressing
             return compressed;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortLiteralsAndMatchs()
         {
             // literals and matchs lengths <= 15
@@ -96,7 +96,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongMatchs()
         {
             // match length >= 20
@@ -108,7 +108,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongLiterals()
         {
             // long literals (length >= 16) which are not the last literals
@@ -120,7 +120,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMatchRightBeforeLastLiterals()
         {
             Test(new byte[] { 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5 });

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
index acdf73c..998b942 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
@@ -100,5 +100,94 @@ namespace Lucene.Net.Codecs.Compressing
                 this.OuterInstance = outerInstance;
             }
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
index 90b06cf..709af74 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
@@ -84,5 +84,72 @@ namespace Lucene.Net.Codecs.Compressing
             iw.Dispose();
             dir.Dispose();
         }
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test, Timeout(30000)]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
index dd7d708..6a74a51 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
@@ -28,5 +28,86 @@ namespace Lucene.Net.Codecs.Compressing
             base.SetUp();
             Mode = CompressionMode.FAST;
         }
+
+
+        #region AbstractTestLZ4CompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestShortLiteralsAndMatchs()
+        {
+            base.TestShortLiteralsAndMatchs();
+        }
+
+        [Test]
+        public override void TestLongMatchs()
+        {
+            base.TestLongMatchs();
+        }
+
+        [Test]
+        public override void TestLongLiterals()
+        {
+            base.TestLongLiterals();
+        }
+
+        [Test]
+        public override void TestMatchRightBeforeLastLiterals()
+        {
+            base.TestMatchRightBeforeLastLiterals();
+        }
+
+        #endregion
+
+        #region AbstractTestCompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDecompress()
+        {
+            base.TestDecompress();
+        }
+
+        [Test]
+        public override void TestPartialDecompress()
+        {
+            base.TestPartialDecompress();
+        }
+
+        [Test]
+        public override void TestEmptySequence()
+        {
+            base.TestEmptySequence();
+        }
+
+        [Test]
+        public override void TestShortSequence()
+        {
+            base.TestShortSequence();
+        }
+
+        [Test]
+        public override void TestIncompressible()
+        {
+            base.TestIncompressible();
+        }
+
+        [Test]
+        public override void TestConstant()
+        {
+            base.TestConstant();
+        }
+
+        [Test]
+        public override void TestLUCENE5201()
+        {
+            base.TestLUCENE5201();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
index d7fc0b0..b90a582 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
@@ -38,5 +38,86 @@ namespace Lucene.Net.Codecs.Compressing
             Assert.IsTrue(compressed.Length <= compressed2.Length);
             return compressed;
         }
+
+
+        #region AbstractTestLZ4CompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestShortLiteralsAndMatchs()
+        {
+            base.TestShortLiteralsAndMatchs();
+        }
+
+        [Test]
+        public override void TestLongMatchs()
+        {
+            base.TestLongMatchs();
+        }
+
+        [Test]
+        public override void TestLongLiterals()
+        {
+            base.TestLongLiterals();
+        }
+
+        [Test]
+        public override void TestMatchRightBeforeLastLiterals()
+        {
+            base.TestMatchRightBeforeLastLiterals();
+        }
+
+        #endregion
+
+        #region AbstractTestCompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDecompress()
+        {
+            base.TestDecompress();
+        }
+
+        [Test]
+        public override void TestPartialDecompress()
+        {
+            base.TestPartialDecompress();
+        }
+
+        [Test]
+        public override void TestEmptySequence()
+        {
+            base.TestEmptySequence();
+        }
+
+        [Test]
+        public override void TestShortSequence()
+        {
+            base.TestShortSequence();
+        }
+
+        [Test]
+        public override void TestIncompressible()
+        {
+            base.TestIncompressible();
+        }
+
+        [Test]
+        public override void TestConstant()
+        {
+            base.TestConstant();
+        }
+
+        [Test]
+        public override void TestLUCENE5201()
+        {
+            base.TestLUCENE5201();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
index eebcda1..679d1f0 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
@@ -28,5 +28,55 @@ namespace Lucene.Net.Codecs.Compressing
             base.SetUp();
             Mode = CompressionMode.HIGH_COMPRESSION;
         }
+
+
+        #region AbstractTestCompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDecompress()
+        {
+            base.TestDecompress();
+        }
+
+        [Test]
+        public override void TestPartialDecompress()
+        {
+            base.TestPartialDecompress();
+        }
+
+        [Test]
+        public override void TestEmptySequence()
+        {
+            base.TestEmptySequence();
+        }
+
+        [Test]
+        public override void TestShortSequence()
+        {
+            base.TestShortSequence();
+        }
+
+        [Test]
+        public override void TestIncompressible()
+        {
+            base.TestIncompressible();
+        }
+
+        [Test]
+        public override void TestConstant()
+        {
+            base.TestConstant();
+        }
+
+        [Test]
+        public override void TestLUCENE5201()
+        {
+            base.TestLUCENE5201();
+        }
+        #endregion
+
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
index cf1bafc..0ab9a7b 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
@@ -42,5 +42,68 @@ namespace Lucene.Net.Codecs.Lucene3x
                 return Codec_Renamed;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
index b28f86a..d3d0889 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
@@ -52,5 +52,89 @@ namespace Lucene.Net.Codecs.Lucene3x
             // for 3.x: we currently cannot take an index with existing 4.x segments
             // and merge into newly formed 3.x segments.
         }
+
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test, Timeout(120000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
index 1cf090b..5756752 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
@@ -46,5 +46,72 @@ namespace Lucene.Net.Codecs.Lucene3x
         {
             return ValidOptions(Options.NONE, Options.POSITIONS_AND_OFFSETS);
         }
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test, Timeout(300000)]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
index 9ee39e7..3686767 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
@@ -50,5 +50,506 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             return false;
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
index c7f7f07..0d3666d 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
@@ -44,5 +44,68 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
index 4e57234..4e3bebf 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
@@ -41,5 +41,94 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, Timeout(80000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
index 342d7ce..9a6e544 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
@@ -41,5 +41,72 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test, Timeout(300000)]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
index 201eaf6..fb309a5 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Codecs.Lucene41
 {
     /*
@@ -34,5 +36,68 @@ namespace Lucene.Net.Codecs.Lucene41
                 return Codec_Renamed;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
index 4259478..bcd5a49 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
@@ -40,5 +40,94 @@ namespace Lucene.Net.Codecs.Lucene41
                 return new Lucene41RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, Timeout(120000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
index 7f4438b..598f373 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
@@ -51,5 +51,531 @@ namespace Lucene.Net.Codecs.Lucene42
         {
             return false;
         }
+
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file


[41/50] [abbrv] lucenenet git commit: Fixed hash code value and ToString() bug in Queries.CommonTermsQuery

Posted by ni...@apache.org.
Fixed hash code value and ToString() bug in Queries.CommonTermsQuery


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

Branch: refs/heads/master
Commit: 8c20d3fdfa7ede98f0116351775dd5ce8d138214
Parents: 1fe048c
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 23 18:00:47 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:48 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Queries/CommonTermsQuery.cs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8c20d3fd/src/Lucene.Net.Queries/CommonTermsQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/CommonTermsQuery.cs b/src/Lucene.Net.Queries/CommonTermsQuery.cs
index dae7292..62e7cd8 100644
--- a/src/Lucene.Net.Queries/CommonTermsQuery.cs
+++ b/src/Lucene.Net.Queries/CommonTermsQuery.cs
@@ -1,6 +1,7 @@
 \ufeffusing System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Globalization;
 using System.Linq;
 using System.Text;
 using Lucene.Net.Index;
@@ -375,8 +376,8 @@ namespace Lucene.Net.Queries
             {
                 buffer.Append('~');
                 buffer.Append("(");
-                buffer.Append(LowFreqMinimumNumberShouldMatch);
-                buffer.Append(HighFreqMinimumNumberShouldMatch);
+                buffer.AppendFormat(CultureInfo.InvariantCulture, "{0:0.0#######}", LowFreqMinimumNumberShouldMatch);
+                buffer.AppendFormat(CultureInfo.InvariantCulture, "{0:0.0#######}", HighFreqMinimumNumberShouldMatch);
                 buffer.Append(")");
             }
             if (Boost != 1.0f)
@@ -398,7 +399,7 @@ namespace Lucene.Net.Queries
             result = prime * result + Number.FloatToIntBits(maxTermFrequency);
             result = prime * result + Number.FloatToIntBits(LowFreqMinimumNumberShouldMatch);
             result = prime * result + Number.FloatToIntBits(HighFreqMinimumNumberShouldMatch);
-            result = prime * result + ((terms == null) ? 0 : terms.GetHashCode());
+            result = prime * result + ((terms == null) ? 0 : terms.GetValueHashCode());
             return result;
         }
 


[26/50] [abbrv] lucenenet git commit: Fixed bug in Core.Search.TestFieldCache (number of threads not specified on the Barrier)

Posted by ni...@apache.org.
Fixed bug in Core.Search.TestFieldCache (number of threads not specified on the Barrier)


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

Branch: refs/heads/master
Commit: cd60689f15cae35ca8355f0c2d37ca7a5d794eae
Parents: d235115
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Oct 19 05:47:28 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:58 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Search/TestFieldCache.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd60689f/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
index c7dd8bd..9c71e78 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
@@ -453,7 +453,7 @@ namespace Lucene.Net.Search
             AtomicBoolean failed = new AtomicBoolean();
             AtomicInteger iters = new AtomicInteger();
             int NUM_ITER = 200 * RANDOM_MULTIPLIER;
-            Barrier restart = new Barrier(1, (barrier) => new RunnableAnonymousInnerClassHelper(this, cache, iters).Run());
+            Barrier restart = new Barrier(NUM_THREADS, (barrier) => new RunnableAnonymousInnerClassHelper(this, cache, iters).Run());
             for (int threadIDX = 0; threadIDX < NUM_THREADS; threadIDX++)
             {
                 threads[threadIDX] = new ThreadAnonymousInnerClassHelper(this, cache, failed, iters, NUM_ITER, restart);


[20/50] [abbrv] lucenenet git commit: Fixed parsing bug in Core.Search.FieldCache. Also changed IFieldCache.InfoStream from StreamWriter to TextWriter to allow more flexibility in usage (can use a StringWriter rather than writing to a stream).

Posted by ni...@apache.org.
Fixed parsing bug in Core.Search.FieldCache. Also changed IFieldCache.InfoStream from StreamWriter to TextWriter to allow more flexibility in usage (can use a StringWriter rather than writing to a stream).


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

Branch: refs/heads/master
Commit: fac1be26229ef2212fd1d9a5a683545a1fef64e8
Parents: 35bc499
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 17 22:33:51 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:56 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/FieldCache.cs           |  8 ++++++--
 src/Lucene.Net.Core/Search/FieldCacheImpl.cs       |  8 ++++----
 src/Lucene.Net.Tests/core/Search/TestFieldCache.cs | 15 +++++++++------
 3 files changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fac1be26/src/Lucene.Net.Core/Search/FieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldCache.cs b/src/Lucene.Net.Core/Search/FieldCache.cs
index 2e269c0..712de8d 100644
--- a/src/Lucene.Net.Core/Search/FieldCache.cs
+++ b/src/Lucene.Net.Core/Search/FieldCache.cs
@@ -349,7 +349,7 @@ namespace Lucene.Net.Search
         /// entries are created that are not sane according to
         /// <seealso cref="Lucene.Net.Util.FieldCacheSanityChecker"/>.
         /// </summary>
-        StreamWriter InfoStream { set; get; }
+        TextWriter InfoStream { set; get; }
     }
 
     public static class FieldCache
@@ -568,7 +568,11 @@ namespace Lucene.Net.Search
                 // UTF8 bytes... but really users should use
                 // FloatField, instead, which already decodes
                 // directly from byte[]
-                return float.Parse(term.Utf8ToString(), NumberStyles.Float, CultureInfo.InvariantCulture);
+
+                // LUCENENET: We parse to double first and then cast to float, which allows us to parse 
+                // double.MaxValue.ToString("R") (resulting in Infinity). This is how it worked in Java
+                // and the TestFieldCache.TestInfoStream() test depends on this behavior to pass.
+                return (float)double.Parse(term.Utf8ToString(), NumberStyles.Float, CultureInfo.InvariantCulture);
             }
 
             public TermsEnum TermsEnum(Terms terms)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fac1be26/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldCacheImpl.cs b/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
index 7f9e301..2eb716e 100644
--- a/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
+++ b/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
@@ -295,7 +295,7 @@ namespace Lucene.Net.Search
                             // call to FieldCache.getXXX
                             if (key.Custom != null && Wrapper != null)
                             {
-                                StreamWriter infoStream = Wrapper.InfoStream;
+                                TextWriter infoStream = Wrapper.InfoStream;
                                 if (infoStream != null)
                                 {
                                     PrintNewInsanity(infoStream, progress.Value);
@@ -308,7 +308,7 @@ namespace Lucene.Net.Search
                 return value;
             }
 
-            internal virtual void PrintNewInsanity(StreamWriter infoStream, object value)
+            internal virtual void PrintNewInsanity(TextWriter infoStream, object value)
             {
                 FieldCacheSanityChecker.Insanity[] insanities = FieldCacheSanityChecker.CheckSanity(Wrapper);
                 for (int i = 0; i < insanities.Length; i++)
@@ -1931,9 +1931,9 @@ namespace Lucene.Net.Search
             }
         }
 
-        private volatile StreamWriter infoStream;
+        private volatile TextWriter infoStream;
 
-        public virtual StreamWriter InfoStream
+        public virtual TextWriter InfoStream
         {
             set
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fac1be26/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
index abe05f7..c7dd8bd 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
@@ -64,7 +64,7 @@ namespace Lucene.Net.Search
     using IOUtils = Lucene.Net.Util.IOUtils;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
     using TestUtil = Lucene.Net.Util.TestUtil;
-    
+    using System.Text;
 
     [TestFixture]
     public class TestFieldCache : LuceneTestCase
@@ -158,11 +158,14 @@ namespace Lucene.Net.Search
             try
             {
                 IFieldCache cache = FieldCache.DEFAULT;
-                MemoryStream bos = new MemoryStream(1024);
-                cache.InfoStream = new StreamWriter(bos.ToString(), false, IOUtils.CHARSET_UTF_8);
-                cache.GetDoubles(Reader, "theDouble", false);
-                cache.GetFloats(Reader, "theDouble", false);
-                Assert.IsTrue(bos.ToString(/*IOUtils.UTF_8*/).IndexOf("WARNING") != -1);
+                StringBuilder sb = new StringBuilder();
+                using (var bos = new StringWriter(sb))
+                {
+                    cache.InfoStream = bos;
+                    cache.GetDoubles(Reader, "theDouble", false);
+                    cache.GetFloats(Reader, "theDouble", false);
+                }
+                Assert.IsTrue(sb.ToString(/*IOUtils.UTF_8*/).IndexOf("WARNING") != -1);
             }
             finally
             {


[03/50] [abbrv] lucenenet git commit: Added LuceneNetSpecific attribute to Core.Util.TestFixedBitSet.TestClearSmall() and Core.Util.TestFixedBitSet.TestClearLarge()

Posted by ni...@apache.org.
Added LuceneNetSpecific attribute to Core.Util.TestFixedBitSet.TestClearSmall() and Core.Util.TestFixedBitSet.TestClearLarge()


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

Branch: refs/heads/master
Commit: f9166324043af17ef57cb150307f9dca7b0841ed
Parents: 2fdd960
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 03:38:48 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:50 2016 +0700

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


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9166324/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
index a62569d..2f822f9 100644
--- a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
@@ -268,7 +268,7 @@ namespace Lucene.Net.Util
             DoRandomSets(AtLeast(1200), AtLeast(1000), 2);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public void TestClearSmall()
         {
             FixedBitSet a = new FixedBitSet(30);   // 0110010111001000101101001001110...0
@@ -297,7 +297,7 @@ namespace Lucene.Net.Util
             Assert.True(a.Equals(b));
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public void TestClearLarge()
         {
             int iters = AtLeast(1000);


[02/50] [abbrv] lucenenet git commit: Added LuceneNetSpecific attribute to Core.Util.TestLongBitSet.TestClearSmall() and Core.Util.TestLongBitSet.TestClearLarge()

Posted by ni...@apache.org.
Added LuceneNetSpecific attribute to Core.Util.TestLongBitSet.TestClearSmall() and Core.Util.TestLongBitSet.TestClearLarge()


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

Branch: refs/heads/master
Commit: 4b7b2670efaf50820cd35db0891a98ae7c6d2d03
Parents: f916632
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 05:07:55 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:50 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b7b2670/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
index 52de7e9..d45fb4d 100644
--- a/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
@@ -16,6 +16,7 @@
  */
 
 using System;
+using Lucene.Net.Attributes;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
 using NUnit.Framework;
@@ -210,7 +211,7 @@ namespace Lucene.Net.Util
             DoRandomSets(AtLeast(1200), AtLeast(1000), 2);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public void TestClearSmall()
         {
             LongBitSet a = new LongBitSet(30);   // 0110010111001000101101001001110...0
@@ -239,7 +240,7 @@ namespace Lucene.Net.Util
             Assert.True(a.Equals(b));
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public void TestClearLarge()
         {
             int iters = AtLeast(1000);


[36/50] [abbrv] lucenenet git commit: Fixed bug in Core.Search.FieldCacheImpl where value to be cached was being overwritten by TryGetValue.

Posted by ni...@apache.org.
Fixed bug in Core.Search.FieldCacheImpl where value to be cached was being overwritten by TryGetValue.


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

Branch: refs/heads/master
Commit: 3979bbf70c1ce238529b96010453e5726e2a214c
Parents: 92de8d7
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Oct 21 01:57:45 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:45 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/FieldCacheImpl.cs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3979bbf7/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldCacheImpl.cs b/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
index 2eb716e..e38c16b 100644
--- a/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
+++ b/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
@@ -239,7 +239,12 @@ namespace Lucene.Net.Search
                         ReaderCache[readerKey] = innerCache;
                         Wrapper.InitReader(reader);
                     }
-                    if (!innerCache.TryGetValue(key, out value))
+                    // LUCENENET NOTE: We declare a temp variable here so we 
+                    // don't overwrite value variable with the null
+                    // that will result when this if block succeeds; otherwise
+                    // we won't have a value to put in the cache.
+                    object temp;
+                    if (!innerCache.TryGetValue(key, out temp))
                     {
                         innerCache[key] = value;
                     }


[46/50] [abbrv] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.


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

Branch: refs/heads/master
Commit: 4dbc3590361814d13fae64c8d030820eb4987489
Parents: 8c20d3f
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 15 05:05:48 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:49 2016 +0700

----------------------------------------------------------------------
 .../BaseCompressingDocValuesFormatTestCase.cs   |   3 +
 .../Index/BaseDocValuesFormatTestCase.cs        | 156 +++---
 .../Index/BaseIndexFileFormatTestCase.cs        |   2 +-
 .../Index/BasePostingsFormatTestCase.cs         |  14 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  22 +-
 .../Index/BaseTermVectorsFormatTestCase.cs      |  14 +-
 .../Util/BaseDocIdSetTestCase.cs                |  10 +-
 .../BlockTerms/TestFixedGapPostingsFormat.cs    |  63 +++
 .../Bloom/TestBloomPostingsFormat.cs            |  63 +++
 .../DiskDv/TestDiskDocValuesFormat.cs           | 526 ++++++++++++++++++
 .../IntBlock/TestFixedIntBlockPostingsFormat.cs |  63 +++
 .../TestVariableIntBlockPostingsFormat.cs       |  63 +++
 .../Memory/TestDirectDocValuesFormat.cs         | 501 ++++++++++++++++++
 .../Memory/TestDirectPostingsFormat.cs          |  63 +++
 .../Memory/TestFSTOrdPostingsFormat.cs          |  63 +++
 .../Memory/TestFSTOrdPulsing41PostingsFormat.cs |  63 +++
 .../Memory/TestFSTPostingsFormat.cs             |  63 +++
 .../Memory/TestFSTPulsing41PostingsFormat.cs    |  63 +++
 .../Memory/TestMemoryDocValuesFormat.cs         | 526 ++++++++++++++++++
 .../Memory/TestMemoryPostingsFormat.cs          |  62 +++
 .../Pulsing/TestPulsingPostingsFormat.cs        |  63 +++
 .../Sep/TestSepPostingsFormat.cs                |  62 +++
 .../SimpleText/TestSimpleTextDocValuesFormat.cs | 500 ++++++++++++++++++
 .../SimpleText/TestSimpleTextPostingsFormat.cs  |  63 +++
 .../TestSimpleTextStoredFieldsFormat.cs         |  88 ++++
 .../TestSimpleTextTermVectorsFormat.cs          |  66 +++
 .../Index/Sorter/IndexSortingTest.cs            |  56 ++
 .../Index/Sorter/SorterTestBase.cs              |  16 +-
 .../Index/Sorter/SortingAtomicReaderTest.cs     |  56 ++
 .../Classic/TestQueryParser.cs                  | 250 +++++++++
 .../Ext/TestExtendableQueryParser.cs            | 369 +++++++++++++
 .../Compressing/AbstractTestCompressionMode.cs  |  14 +-
 .../AbstractTestLZ4CompressionMode.cs           |   8 +-
 .../TestCompressingStoredFieldsFormat.cs        |  89 ++++
 .../TestCompressingTermVectorsFormat.cs         |  67 +++
 .../Compressing/TestFastCompressionMode.cs      |  81 +++
 .../Compressing/TestFastDecompressionMode.cs    |  81 +++
 .../Compressing/TestHighCompressionMode.cs      |  50 ++
 .../Lucene3x/TestLucene3xPostingsFormat.cs      |  63 +++
 .../Lucene3x/TestLucene3xStoredFieldsFormat.cs  |  84 +++
 .../Lucene3x/TestLucene3xTermVectorsFormat.cs   |  67 +++
 .../Lucene40/TestLucene40DocValuesFormat.cs     | 501 ++++++++++++++++++
 .../Lucene40/TestLucene40PostingsFormat.cs      |  63 +++
 .../Lucene40/TestLucene40StoredFieldsFormat.cs  |  89 ++++
 .../Lucene40/TestLucene40TermVectorsFormat.cs   |  67 +++
 .../Codecs/Lucene41/TestBlockPostingsFormat.cs  |  65 +++
 .../Lucene41/TestLucene41StoredFieldsFormat.cs  |  89 ++++
 .../Lucene42/TestLucene42DocValuesFormat.cs     | 526 ++++++++++++++++++
 .../Lucene45/TestLucene45DocValuesFormat.cs     | 527 +++++++++++++++++++
 .../Perfield/TestPerFieldDocValuesFormat.cs     | 501 ++++++++++++++++++
 .../Perfield/TestPerFieldPostingsFormat.cs      |  51 ++
 .../core/Index/TestDocValuesFormat.cs           | 503 ++++++++++++++++++
 .../core/Index/TestLogMergePolicy.cs            |  15 +
 .../core/Index/TestNumericDocValuesUpdates.cs   |   2 +-
 .../TestPersistentSnapshotDeletionPolicy.cs     |  50 ++
 .../core/Index/TestPostingsFormat.cs            |  50 ++
 .../core/Index/TestStoredFieldsFormat.cs        |  83 +++
 .../core/Index/TestTermVectorsFormat.cs         |  55 ++
 .../core/Index/TestTieredMergePolicy.cs         |  14 +
 .../core/Search/BaseTestRangeFilter.cs          |   2 +-
 .../Spans/TestSpanExplanationsOfNonMatches.cs   | 214 ++++++++
 .../TestComplexExplanationsOfNonMatches.cs      | 160 ++++++
 .../core/Search/TestExplanations.cs             |   2 +-
 .../core/Search/TestFieldCacheRangeFilter.cs    |  14 +
 .../core/Search/TestFieldCacheRewriteMethod.cs  |  17 +
 .../core/Search/TestMultiTermConstantScore.cs   |  14 +
 .../core/Search/TestSimpleExplanations.cs       |  19 +
 .../TestSimpleExplanationsOfNonMatches.cs       | 452 ++++++++++++++++
 .../core/Search/TestTermRangeFilter.cs          |  14 +
 .../core/Support/TestLurchTable.cs              | 176 ++++++-
 .../core/Util/BaseSortTestCase.cs               |  18 +-
 .../core/Util/Packed/TestEliasFanoDocIdSet.cs   |  45 ++
 .../core/Util/TestDocIdBitSet.cs                |  46 ++
 .../core/Util/TestFixedBitSet.cs                |  45 ++
 .../core/Util/TestInPlaceMergeSorter.cs         |  64 +++
 .../core/Util/TestIntroSorter.cs                |  64 +++
 .../core/Util/TestOpenBitSet.cs                 |  44 ++
 .../core/Util/TestPForDeltaDocIdSet.cs          |  44 ++
 src/Lucene.Net.Tests/core/Util/TestTimSorter.cs |  64 +++
 .../core/Util/TestWAH8DocIdSet.cs               |  44 ++
 80 files changed, 9250 insertions(+), 159 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
index d88ecb4..54d7fd5 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
@@ -45,6 +45,7 @@ namespace Lucene.Net.Index
             return size;
         }
 
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestUniqueValuesCompression()
         {
             Directory dir = new RAMDirectory();
@@ -85,6 +86,7 @@ namespace Lucene.Net.Index
             Assert.IsTrue(size2 < size1 + 8 * 20);
         }
 
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDateCompression()
         {
             Directory dir = new RAMDirectory();
@@ -115,6 +117,7 @@ namespace Lucene.Net.Index
             Assert.IsTrue(size2 < size1 + (PackedInts.BitsRequired(day) * 50) / 8);
         }
 
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSingleBigValueCompression()
         {
             Directory dir = new RAMDirectory();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index ebc4c19..fa46ef8 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -84,7 +84,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestOneNumber()
         {
             Directory directory = NewDirectory();
@@ -119,7 +119,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestOneFloat()
         {
             Directory directory = NewDirectory();
@@ -154,7 +154,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoNumbers()
         {
             Directory directory = NewDirectory();
@@ -192,7 +192,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoBinaryValues()
         {
             Directory directory = NewDirectory();
@@ -233,7 +233,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoFieldsMixed()
         {
             Directory directory = NewDirectory();
@@ -273,7 +273,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeFieldsMixed()
         {
             Directory directory = NewDirectory();
@@ -318,7 +318,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeFieldsMixed2()
         {
             Directory directory = NewDirectory();
@@ -363,7 +363,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoDocumentsNumeric()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -392,7 +392,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -436,7 +436,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBigNumericRange()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -465,7 +465,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBigNumericRange2()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -494,7 +494,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -534,7 +534,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -580,7 +580,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -620,7 +620,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytesTwoDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -652,7 +652,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytesThreeDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -691,7 +691,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -742,7 +742,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedMergeAwayAllValues()
         {
             Directory directory = NewDirectory();
@@ -784,7 +784,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBytesWithNewline()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -810,7 +810,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMissingSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -843,7 +843,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedTermsEnum()
         {
             Directory directory = NewDirectory();
@@ -916,7 +916,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptySortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -948,7 +948,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptyBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -980,7 +980,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestVeryLargeButLegalBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1009,7 +1009,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestVeryLargeButLegalSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1037,7 +1037,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1065,7 +1065,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1093,7 +1093,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1128,7 +1128,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnSortedBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1166,7 +1166,7 @@ namespace Lucene.Net.Index
         /*
          * Simple test case to show how to use the API
          */
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocValuesSimple()
         {
             Directory dir = NewDirectory();
@@ -1211,7 +1211,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandomSortedBytes()
         {
             Directory dir = NewDirectory();
@@ -1488,7 +1488,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBooleanNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1498,7 +1498,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestByteNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1508,7 +1508,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestByteMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1518,7 +1518,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1528,7 +1528,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1538,7 +1538,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIntNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1548,7 +1548,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIntMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1558,7 +1558,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1568,7 +1568,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1643,7 +1643,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBinaryFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1654,7 +1654,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBinaryVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1788,7 +1788,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1799,7 +1799,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedFixedLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1810,7 +1810,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedVariableLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1820,7 +1820,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1830,7 +1830,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetOneValue()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1858,7 +1858,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1896,7 +1896,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsMerged()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1941,7 +1941,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1974,7 +1974,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoValuesUnordered()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2007,7 +2007,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetThreeValuesTwoDocs()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2059,7 +2059,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsLastMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2094,7 +2094,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsLastMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2131,7 +2131,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsFirstMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2167,7 +2167,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsFirstMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2204,7 +2204,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetMergeAwayAllValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2235,7 +2235,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTermsEnum()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2391,7 +2391,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetFixedLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2403,7 +2403,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetVariableLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2414,7 +2414,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetFixedLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2426,7 +2426,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetVariableLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2648,7 +2648,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetFixedLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2660,7 +2660,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetVariableLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2671,7 +2671,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestGCDCompression()
         {
             int numIterations = AtLeast(1);
@@ -2704,13 +2704,13 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestZeros()
         {
             DoTestNumericsVsStoredFields(0, 0);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestZeroOrMin()
         {
             // try to make GCD compression fail if the format did not anticipate that
@@ -2738,7 +2738,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoNumbersOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2769,7 +2769,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2801,7 +2801,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2839,7 +2839,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoBytesOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2873,7 +2873,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2908,7 +2908,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2951,7 +2951,7 @@ namespace Lucene.Net.Index
         }
 
         // LUCENE-4853
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestHugeBinaryValues()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -3072,7 +3072,7 @@ namespace Lucene.Net.Index
         }
 
         // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestHugeBinaryValueLimit()
         {
             // We only test DVFormats that have a limit
@@ -3157,7 +3157,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreads()
         {
             Directory dir = NewDirectory();
@@ -3276,7 +3276,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Tests dv against stored fields with threads (all types + missing)
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreads2()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -3466,7 +3466,7 @@ namespace Lucene.Net.Index
         }
 
         // LUCENE-5218
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptyBinaryValueOnPageSizes()
         {
             // Test larger and larger power-of-two sized values,

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
index d65a88b..9a49a6f 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
@@ -90,7 +90,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// The purpose of this test is to make sure that bulk merge doesn't accumulate useless data over runs.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMergeStability()
         {
             Directory dir = NewDirectory();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
index b9dfb8b..ffef930 100644
--- a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
@@ -1245,43 +1245,43 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsOnly()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_ONLY, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqs()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositions()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositionsAndPayloads()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, true);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositionsAndOffsets()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, true);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandom()
         {
             int iters = 5;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index a63eb84..2acb5fa 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -74,7 +74,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandomStoredFields()
         {
             Directory dir = NewDirectory();
@@ -190,7 +190,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // LUCENE-1727: make sure doc fields are stored in order
         public virtual void TestStoredFieldsOrder()
         {
@@ -227,7 +227,7 @@ namespace Lucene.Net.Index
             d.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // LUCENE-1219
         public virtual void TestBinaryFieldOffsetLength()
         {
@@ -261,7 +261,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNumericField()
         {
             Directory dir = NewDirectory();
@@ -346,7 +346,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIndexedBit()
         {
             Directory dir = NewDirectory();
@@ -365,7 +365,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestReadSkip()
         {
             Directory dir = NewDirectory();
@@ -420,7 +420,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test, Timeout(300000)]
+        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptyDocs()
         {
             Directory dir = NewDirectory();
@@ -449,7 +449,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test, Timeout(300000)]
+        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestConcurrentReads()
         {
             Directory dir = NewDirectory();
@@ -564,7 +564,7 @@ namespace Lucene.Net.Index
             return result;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestWriteReadMerge()
         {
             // get another codec, other than the default: so we are merging segments across different codecs
@@ -670,7 +670,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test, LongRunningTest, Timeout(int.MaxValue)]
+        // [Test, LongRunningTest, Timeout(int.MaxValue)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBigDocuments()
         {
             // "big" as "much bigger than the chunk size"
@@ -747,7 +747,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBulkMergeWithDeletes()
         {
             int numDocs = AtLeast(200);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index 85207ad..5e5b20e 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -668,7 +668,7 @@ namespace Lucene.Net.Index
             return (new IndexSearcher(reader)).Search(new TermQuery(new Term("id", id)), 1).ScoreDocs[0].Doc;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // only one doc with vectors
         public virtual void TestRareVectors()
         {
@@ -715,7 +715,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestHighFreqs()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 3, 5);
@@ -737,7 +737,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test, LongRunningTest, Timeout(int.MaxValue)]
+        // [Test, LongRunningTest, Timeout(int.MaxValue)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLotsOfFields()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 500, 10);
@@ -755,7 +755,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test, Timeout(300000)]
+        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // different options for the same field
         public virtual void TestMixedOptions()
         {
@@ -790,7 +790,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandom()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 5, 20);
@@ -817,7 +817,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMerge()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 5, 20);
@@ -866,7 +866,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // run random tests from different threads to make sure the per-thread clones
         // don't share mutable data
         public virtual void TestClone()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
index 2cfe630..e69ed7c 100644
--- a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
@@ -77,7 +77,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=0.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNoBit()
         {
             BitArray bs = new BitArray(1);
@@ -88,7 +88,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=1.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void Test1Bit()
         {
             BitArray bs = new BitArray(1);
@@ -103,7 +103,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=2.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void Test2Bits()
         {
             BitArray bs = new BitArray(2);
@@ -122,8 +122,8 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Compare the content of the set against a <seealso cref="BitSet"/>.
         /// </summary>
-        [Test, Timeout(150000)]
-        [LongRunningTest]
+        // [Test, Timeout(150000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        //[LongRunningTest]
         public virtual void TestAgainstBitSet()
         {
             int numBits = TestUtil.NextInt(Random(), 100, 1 << 20);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
index a66f96c..6d913b5 100644
--- a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
@@ -38,5 +38,68 @@ namespace Lucene.Net.Codecs.BlockTerms
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
index d4e1286..d19e11a 100644
--- a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Bloom
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
index a0b868b..cd69092 100644
--- a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
@@ -36,5 +36,531 @@ namespace Lucene.Net.Codecs.DiskDV
                 return codec;
             }
         }
+
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
index 1cd9e4b..26b2684 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
@@ -36,5 +36,68 @@ namespace Lucene.Net.Codecs.IntBlock
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
index 0b74a74..c255c90 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
@@ -41,5 +41,68 @@ namespace Lucene.Net.Codecs.IntBlock
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file


[42/50] [abbrv] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs b/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
index eb92962..264e95c 100644
--- a/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
+++ b/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
@@ -529,6 +529,118 @@ namespace Lucene.Net.Support
                 return KeyComparer.GetHashCode(obj.Key) ^ ValueComparer.GetHashCode(obj.Value);
             }
         }
+
+
+        #region TestGenericCollection<TList, TItem>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestAddRemove()
+        {
+            base.TestAddRemove();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestAddReverseRemove()
+        {
+            base.TestAddReverseRemove();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestClear()
+        {
+            base.TestClear();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestContains()
+        {
+            base.TestContains();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestCopyTo()
+        {
+            base.TestCopyTo();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestIsReadOnly()
+        {
+            base.TestIsReadOnly();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestGetEnumerator()
+        {
+            base.TestGetEnumerator();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestGenericCollection_TestGetEnumerator2()
+        {
+            base.TestGetEnumerator2();
+        }
+
+        #endregion
+
+        #region TestCollection<TList, TFactory, TItem>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestAddRemove()
+        {
+            base.TestAddRemove();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestAddReverseRemove()
+        {
+            base.TestAddReverseRemove();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestClear()
+        {
+            base.TestClear();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestContains()
+        {
+            base.TestContains();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestCopyTo()
+        {
+            base.TestCopyTo();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestIsReadOnly()
+        {
+            base.TestIsReadOnly();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestGetEnumerator()
+        {
+            base.TestGetEnumerator();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestCollection_TestGetEnumerator2()
+        {
+            base.TestGetEnumerator2();
+        }
+
+        #endregion
+
     }
 
     [TestFixture]
@@ -553,6 +665,32 @@ namespace Lucene.Net.Support
             }
             return results.ToArray();
         }
+
+
+        #region TestDictionary<TDictionary, TFactory, TKey, TValue>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test, LuceneNetSpecific]
+        public void TestDictionary_TestAddRemoveByKey()
+        {
+            base.TestAddRemoveByKey();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestDictionary_TestKeys()
+        {
+            base.TestKeys();
+        }
+
+        [Test, LuceneNetSpecific]
+        public void TestDictionary_TestValues()
+        {
+            base.TestValues();
+        }
+
+        #endregion
     }
 
 
@@ -579,7 +717,7 @@ namespace Lucene.Net.Support
             return list;
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAddRemove()
         {
             TList list = new TList();
@@ -600,7 +738,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAddReverseRemove()
         {
             TList list = new TList();
@@ -621,7 +759,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestClear()
         {
             TList list = new TList();
@@ -636,7 +774,7 @@ namespace Lucene.Net.Support
             Assert.AreEqual(0, list.Count);
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestContains()
         {
             TList list = new TList();
@@ -650,7 +788,7 @@ namespace Lucene.Net.Support
                 Assert.IsTrue(list.Contains(item));
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCopyTo()
         {
             TList list = new TList();
@@ -670,13 +808,13 @@ namespace Lucene.Net.Support
             Assert.AreEqual(0, items.Count);
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIsReadOnly()
         {
             Assert.IsFalse(new TList().IsReadOnly);
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestGetEnumerator()
         {
             TList list = new TList();
@@ -692,7 +830,7 @@ namespace Lucene.Net.Support
             Assert.AreEqual(0, items.Count);
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestGetEnumerator2()
         {
             TList list = new TList();
@@ -758,7 +896,7 @@ namespace Lucene.Net.Support
         where TDictionary : IDictionary<TKey, TValue>, IDisposable
         where TFactory : IFactory<TDictionary>, new()
     {
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAddRemoveByKey()
         {
             KeyValuePair<TKey, TValue>[] sample = GetSample();
@@ -780,7 +918,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestKeys()
         {
             KeyValuePair<TKey, TValue>[] sample = GetSample();
@@ -803,7 +941,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestValues()
         {
             KeyValuePair<TKey, TValue>[] sample = GetSample();
@@ -832,7 +970,7 @@ namespace Lucene.Net.Support
 
         protected readonly TFactory Factory = new TFactory();
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAddRemove()
         {
             using (TList list = Factory.Create())
@@ -855,7 +993,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAddReverseRemove()
         {
             using (TList list = Factory.Create())
@@ -878,7 +1016,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestClear()
         {
             using (TList list = Factory.Create())
@@ -895,7 +1033,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestContains()
         {
             using (TList list = Factory.Create())
@@ -911,7 +1049,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCopyTo()
         {
             using (TList list = Factory.Create())
@@ -933,14 +1071,14 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIsReadOnly()
         {
             using (TList list = Factory.Create())
                 Assert.IsFalse(list.IsReadOnly);
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestGetEnumerator()
         {
             using (TList list = Factory.Create())
@@ -958,7 +1096,7 @@ namespace Lucene.Net.Support
             }
         }
 
-        [Test, LuceneNetSpecific]
+        // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestGetEnumerator2()
         {
             using (TList list = Factory.Create())

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
index dd31909..51ac7e2 100644
--- a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
+++ b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
@@ -153,55 +153,55 @@ namespace Lucene.Net.Util
             DoTest(strategy, Random().Next(20000));
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmpty()
         {
             SortTest(new Entry[0]);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestOne()
         {
             DoTest(RandomStrategy, 1);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwo()
         {
             DoTest(RandomStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandom()
         {
             DoTest(RandomStrategy);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandomLowCardinality()
         {
             DoTest(RandomLowCardinalityStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAscending()
         {
             DoTest(AscendingStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAscendingSequences()
         {
             DoTest(AscendingSequencesStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDescending()
         {
             DoTest(DescendingStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestStrictlyDescendingStrategy()
         {
             DoTest(StrictlyDescendingStrategy, 2);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
index 91c7062..38d63a1 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using NUnit.Framework;
 using System.Collections;
 using System.Diagnostics;
 
@@ -75,5 +76,49 @@ namespace Lucene.Net.Util.Packed
                 return SlowAdvance(target);
             }
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
index 1294bff..bb779c5 100644
--- a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
@@ -1,3 +1,5 @@
+using Lucene.Net.Attributes;
+using NUnit.Framework;
 using System.Collections;
 
 namespace Lucene.Net.Util
@@ -25,5 +27,49 @@ namespace Lucene.Net.Util
         {
             return new DocIdBitSet((BitArray)bs.Clone());
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test, LongRunningTest, Timeout(150000)]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
index 550b3e1..2f822f9 100644
--- a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
@@ -1,4 +1,5 @@
 using System;
+using Lucene.Net.Attributes;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
 using NUnit.Framework;
@@ -510,5 +511,49 @@ namespace Lucene.Net.Util
             Assert.IsTrue(bits.Get(1));
             Assert.IsFalse(newBits.Get(1));
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test, LongRunningTest, Timeout(150000)]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
index 5c35706..3649531 100644
--- a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Util
 {
     /*
@@ -32,5 +34,67 @@ namespace Lucene.Net.Util
         {
             return new ArrayInPlaceMergeSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
         }
+
+
+        #region BaseSortTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestEmpty()
+        {
+            base.TestEmpty();
+        }
+
+        [Test]
+        public override void TestOne()
+        {
+            base.TestOne();
+        }
+
+        [Test]
+        public override void TestTwo()
+        {
+            base.TestTwo();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestRandomLowCardinality()
+        {
+            base.TestRandomLowCardinality();
+        }
+
+        [Test]
+        public override void TestAscending()
+        {
+            base.TestAscending();
+        }
+
+        [Test]
+        public override void TestAscendingSequences()
+        {
+            base.TestAscendingSequences();
+        }
+
+        [Test]
+        public override void TestDescending()
+        {
+            base.TestDescending();
+        }
+
+        [Test]
+        public override void TestStrictlyDescendingStrategy()
+        {
+            base.TestStrictlyDescendingStrategy();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
index c71893a..b2c75f8 100644
--- a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Util
 {
     /*
@@ -28,5 +30,67 @@ namespace Lucene.Net.Util
         {
             return new ArrayIntroSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
         }
+
+
+        #region BaseSortTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestEmpty()
+        {
+            base.TestEmpty();
+        }
+
+        [Test]
+        public override void TestOne()
+        {
+            base.TestOne();
+        }
+
+        [Test]
+        public override void TestTwo()
+        {
+            base.TestTwo();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestRandomLowCardinality()
+        {
+            base.TestRandomLowCardinality();
+        }
+
+        [Test]
+        public override void TestAscending()
+        {
+            base.TestAscending();
+        }
+
+        [Test]
+        public override void TestAscendingSequences()
+        {
+            base.TestAscendingSequences();
+        }
+
+        [Test]
+        public override void TestDescending()
+        {
+            base.TestDescending();
+        }
+
+        [Test]
+        public override void TestStrictlyDescendingStrategy()
+        {
+            base.TestStrictlyDescendingStrategy();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
index c72aa45..8144d1c 100644
--- a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
@@ -514,5 +514,49 @@ namespace Lucene.Net.Util
             bits.FastSet(bit - 1);
             Assert.IsTrue(bits.FastGet(bit - 1));
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test, LongRunningTest, Timeout(150000)]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
index 3c92150..b310b7b 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
@@ -38,5 +38,49 @@ namespace Lucene.Net.Util
             base.AssertEquals(numBits, ds1, ds2);
             Assert.AreEqual(ds1.Cardinality(), ds2.Cardinality());
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
index c12b850..8f13308 100644
--- a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Util
 {
     /*
@@ -28,5 +30,67 @@ namespace Lucene.Net.Util
         {
             return new ArrayTimSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>(), TestUtil.NextInt(Random(), 0, arr.Length));
         }
+
+
+        #region BaseSortTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestEmpty()
+        {
+            base.TestEmpty();
+        }
+
+        [Test]
+        public override void TestOne()
+        {
+            base.TestOne();
+        }
+
+        [Test]
+        public override void TestTwo()
+        {
+            base.TestTwo();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestRandomLowCardinality()
+        {
+            base.TestRandomLowCardinality();
+        }
+
+        [Test]
+        public override void TestAscending()
+        {
+            base.TestAscending();
+        }
+
+        [Test]
+        public override void TestAscendingSequences()
+        {
+            base.TestAscendingSequences();
+        }
+
+        [Test]
+        public override void TestDescending()
+        {
+            base.TestDescending();
+        }
+
+        [Test]
+        public override void TestStrictlyDescendingStrategy()
+        {
+            base.TestStrictlyDescendingStrategy();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
index 73d338d..b0d3ea0 100644
--- a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
@@ -106,5 +106,49 @@ namespace Lucene.Net.Util
             }
             AssertEquals(numBits, expected, union);
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file


[24/50] [abbrv] lucenenet git commit: Ported the tests for ByteBuffer from Java and refactored ByteBuffer. Also ported LongBuffer + tests (required by Core.Util.TestPackedInts.TestEncodeDecode()).

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Support/ByteBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/ByteBuffer.cs b/src/Lucene.Net.Core/Support/ByteBuffer.cs
index 9cdb73b..2d5d065 100644
--- a/src/Lucene.Net.Core/Support/ByteBuffer.cs
+++ b/src/Lucene.Net.Core/Support/ByteBuffer.cs
@@ -1,73 +1,332 @@
 \ufeffusing System;
+using System.Diagnostics;
+using System.Text;
 
 namespace Lucene.Net.Support
 {
+    /// <summary>
+    /// A byte buffer.
+    /// <p> This class defines six categories of operations upon
+    /// byte buffers:
+    /// 
+    /// <ul>
+    /// 
+    ///   <li><p> Absolute and relative {@link #get() <i>get</i>} and
+    ///   {@link #put(byte) <i>put</i>} methods that read and write
+    ///   single bytes; </p></li>
+    /// 
+    ///   <li><p> Relative {@link #get(byte[]) <i>bulk get</i>}
+    ///   methods that transfer contiguous sequences of bytes from this buffer
+    ///   into an array; </p></li>
+    /// 
+    ///   <li><p> Relative {@link #put(byte[]) <i>bulk put</i>}
+    ///   methods that transfer contiguous sequences of bytes from a
+    ///   byte array or some other byte
+    ///   buffer into this buffer; </p></li>
+    /// 
+    ///   <li><p> Absolute and relative {@link #getChar() <i>get</i>}
+    ///   and {@link #putChar(char) <i>put</i>} methods that read and
+    ///   write values of other primitive types, translating them to and from
+    ///   sequences of bytes in a particular byte order; </p></li>
+    /// 
+    ///   <li><p> Methods for creating<i><a href = "#views" > view buffers</a></i>,
+    ///   which allow a byte buffer to be viewed as a buffer containing values of
+    ///   some other primitive type; and</p></li>
+    /// 
+    ///   <li><p> Methods for {@link #compact compacting}, {@link
+    ///   #duplicate duplicating}, and {@link #slice slicing}
+    ///   a byte buffer.  </p></li>
+    /// 
+    /// </ul>
+    /// 
+    /// <p> Byte buffers can be created either by {@link #allocate
+    /// <i>allocation</i>}, which allocates space for the buffer's
+    /// 
+    /// content, or by <see cref="Wrap(byte[])"/> <i>wrapping</i>} an
+    /// existing byte array into a buffer.
+    /// 
+    /// <a name="direct"></a>
+    /// <h2> Direct <i>vs.</i> non-direct buffers </h2>
+    /// 
+    /// <p> A byte buffer is either <i>direct</i> or <i>non-direct</i>.  Given a
+    /// direct byte buffer, the Java virtual machine will make a best effort to
+    /// perform native I/O operations directly upon it.  That is, it will attempt to
+    /// avoid copying the buffer's content to (or from) an intermediate buffer
+    /// before (or after) each invocation of one of the underlying operating
+    /// system's native I/O operations.
+    /// 
+    /// <p> A direct byte buffer may be created by invoking the <see cref="AllocateDirect(int)"/>
+    /// #allocateDirect(int) allocateDirect} factory method of this class.  The
+    /// buffers returned by this method typically have somewhat higher allocation
+    /// and deallocation costs than non-direct buffers.  The contents of direct
+    /// buffers may reside outside of the normal garbage-collected heap, and so
+    /// their impact upon the memory footprint of an application might not be
+    /// obvious.  It is therefore recommended that direct buffers be allocated
+    /// primarily for large, long-lived buffers that are subject to the underlying
+    /// system's native I/O operations.  In general it is best to allocate direct
+    /// buffers only when they yield a measureable gain in program performance.
+    /// 
+    /// <p> A direct byte buffer may also be created by {@link
+    /// java.nio.channels.FileChannel#map mapping} a region of a file
+    /// directly into memory.  An implementation of the Java platform may optionally
+    /// support the creation of direct byte buffers from native code via JNI.  If an
+    /// instance of one of these kinds of buffers refers to an inaccessible region
+    /// of memory then an attempt to access that region will not change the buffer's
+    /// content and will cause an unspecified exception to be thrown either at the
+    /// time of the access or at some later time.
+    /// 
+    /// <p> Whether a byte buffer is direct or non-direct may be determined by
+    /// invoking its {@link #isDirect isDirect} method.  This method is provided so
+    /// that explicit buffer management can be done in performance-critical code.
+    /// 
+    /// 
+    /// <a name="bin"></a>
+    /// <h2> Access to binary data </h2>
+    /// 
+    /// <p> This class defines methods for reading and writing values of all other
+    /// primitive types, except <tt>boolean</tt>.  Primitive values are translated
+    /// to (or from) sequences of bytes according to the buffer's current byte
+    /// order, which may be retrieved and modified via the {@link #order order}
+    /// methods.  Specific byte orders are represented by instances of the {@link
+    /// ByteOrder} class.  The initial order of a byte buffer is always {@link
+    /// ByteOrder#BIG_ENDIAN BIG_ENDIAN}.
+    /// 
+    /// <p> For access to heterogeneous binary data, that is, sequences of values of
+    /// different types, this class defines a family of absolute and relative
+    /// <i>get</i> and <i>put</i> methods for each type.  For 32-bit floating-point
+    /// values, for example, this class defines:
+    /// 
+    /// <blockquote><pre>
+    /// float  {@link #getFloat()}
+    /// float  {@link #getFloat(int) getFloat(int index)}
+    ///  void  {@link #putFloat(float) putFloat(float f)}
+    ///  void  {@link #putFloat(int,float) putFloat(int index, float f)}</pre></blockquote>
+    /// 
+    /// <p> Corresponding methods are defined for the types <tt>char</tt>,
+    /// <tt>short</tt>, <tt>int</tt>, <tt>long</tt>, and <tt>double</tt>.  The index
+    /// parameters of the absolute <i>get</i> and <i>put</i> methods are in terms of
+    /// bytes rather than of the type being read or written.
+    /// 
+    /// <a name="views"></a>
+    /// 
+    /// <p> For access to homogeneous binary data, that is, sequences of values of
+    /// the same type, this class defines methods that can create <i>views</i> of a
+    /// given byte buffer.  A <i>view buffer</i> is simply another buffer whose
+    /// content is backed by the byte buffer.  Changes to the byte buffer's content
+    /// will be visible in the view buffer, and vice versa; the two buffers'
+    /// position, limit, and mark values are independent.  The {@link
+    /// #asFloatBuffer() asFloatBuffer} method, for example, creates an instance of
+    /// the {@link FloatBuffer} class that is backed by the byte buffer upon which
+    /// the method is invoked.  Corresponding view-creation methods are defined for
+    /// the types <tt>char</tt>, <tt>short</tt>, <tt>int</tt>, <tt>long</tt>, and
+    /// <tt>double</tt>.
+    /// 
+    /// <p> View buffers have three important advantages over the families of
+    /// type-specific <i>get</i> and <i>put</i> methods described above:
+    /// 
+    /// <ul>
+    /// 
+    ///   <li><p> A view buffer is indexed not in terms of bytes but rather in terms
+    ///   of the type-specific size of its values;  </p></li>
+    /// 
+    ///   <li><p> A view buffer provides relative bulk <i>get</i> and <i>put</i>
+    ///   methods that can transfer contiguous sequences of values between a buffer
+    ///   and an array or some other buffer of the same type; and  </p></li>
+    /// 
+    ///   <li><p> A view buffer is potentially much more efficient because it will
+    ///   be direct if, and only if, its backing byte buffer is direct.  </p></li>
+    /// 
+    /// </ul>
+    /// 
+    /// <p> The byte order of a view buffer is fixed to be that of its byte buffer
+    /// at the time that the view is created.  </p>
+    /// 
+    /// <h2> Invocation chaining </h2>
+    /// 
+    /// <p> Methods in this class that do not otherwise have a value to return are
+    /// specified to return the buffer upon which they are invoked.  This allows
+    /// method invocations to be chained.
+    /// 
+    /// 
+    /// The sequence of statements
+    /// 
+    /// <blockquote><pre>
+    /// bb.putInt(0xCAFEBABE);
+    /// bb.putShort(3);
+    /// bb.putShort(45);</pre></blockquote>
+    /// 
+    /// can, for example, be replaced by the single statement
+    /// 
+    /// <blockquote><pre>
+    /// bb.putInt(0xCAFEBABE).putShort(3).putShort(45);</pre></blockquote>
+    /// 
+    /// @author Mark Reinhold
+    /// @author JSR-51 Expert Group
+    /// @since 1.4
+    /// </summary>
     public abstract class ByteBuffer : Buffer, IComparable<ByteBuffer>
     {
-        // .NET Port Notes: This has been implemented from the best interpretation
-        // of the description of the methods on the Java documentation here:
-        // http://docs.oracle.com/javase/6/docs/api/java/nio/ByteBuffer.html
-        // and from various Googling of the implementation's usage
-
-        private bool _readonly;
-        private byte[] _data;
-        private int _offset;
-
-        protected ByteBuffer(int mark, int pos, int lim, int cap)
+        internal byte[] hb; // Non-null only for heap buffers
+        private int offset;
+        private bool isReadOnly; // Valid only for heap buffers
+
+        /// <summary>
+        /// Creates a new buffer with the given mark, position, limit, capacity,
+        /// backing array, and array offset
+        /// </summary>
+        internal ByteBuffer(int mark, int pos, int lim, int cap,
+            byte[] hb, int offset)
             : base(mark, pos, lim, cap)
         {
+            this.hb = hb;
+            this.offset = offset;
         }
 
-        public override object Array
-        {
-            get { return _data; }
-        }
-
-        public override int ArrayOffset
+        /// <summary>
+        /// Creates a new buffer with the given mark, position, limit, and capacity
+        /// </summary>
+        internal ByteBuffer(int mark, int pos, int lim, int cap)
+            : this(mark, pos, lim, cap, null, 0)
         {
-            get { return _offset; }
         }
 
-        public sealed override bool HasArray
+        /// <summary>
+        /// Allocates a new direct byte buffer. (NOT IMPLEMENTED IN LUCENE.NET)
+        /// 
+        /// <para>
+        /// The new buffer's position will be zero, its limit will be its
+        /// capacity, its mark will be undefined, and each of its elements will be
+        /// initialized to zero.Whether or not it has a
+        /// <see cref="HasArray">backing array</see> is unspecified.</para>
+        /// </summary>
+        /// <param name="capacity">The new buffer's capacity, in bytes</param>
+        /// <returns>The new byte buffer</returns>
+        /// <exception cref="ArgumentException">If the <c>capacity</c> is a negative integer</exception>
+        public static ByteBuffer AllocateDirect(int capacity)
         {
-            get { return _data != null; }
+            throw new NotImplementedException();
+            //return new DirectByteBuffer(capacity);
         }
 
-        public abstract override bool IsDirect { get; }
-
-        public abstract override bool IsReadOnly { get; }
-
+        /// <summary>
+        /// Allocates a new byte buffer.
+        /// 
+        /// <para>
+        /// The new buffer's position will be zero, its limit will be its
+        /// capacity, its mark will be undefined, and each of its elements will be
+        /// initialized to zero.It will have a <see cref="Array">backing array</see>
+        /// and its <see cref="ArrayOffset">array offset</see>
+        ///  will be zero.
+        /// </para>
+        /// </summary>
+        /// <param name="capacity">The new buffer's capacity, in bytes</param>
+        /// <returns>The new byte buffer</returns>
+        /// <exception cref="ArgumentException">If the <c>capacity</c> is a negative integer</exception>
         public static ByteBuffer Allocate(int capacity)
         {
-            return new WrappedByteBuffer(-1, 0, capacity, capacity)
-            {
-                _data = new byte[capacity],
-                _offset = 0
-            };
+            if (capacity < 0)
+                throw new ArgumentException();
+            return new HeapByteBuffer(capacity, capacity);
         }
 
-        // public static ByteBuffer AllocateDirect(int capacity)
-
+        /// <summary>
+        /// Wraps a byte array into a buffer.
+        /// 
+        /// <para>
+        /// The new buffer will be backed by the given byte array;
+        /// that is, modifications to the buffer will cause the array to be modified
+        /// and vice versa.  The new buffer's capacity will be
+        /// <c>array.Length</c>, its position will be <paramref name="offset"/>, its limit
+        /// will be <c>offset + length</c>, and its mark will be undefined.  Its
+        /// <see cref="Array">backing array</see> will be the given array, and
+        /// its <see cref="ArrayOffset">array offset</see> will be zero.
+        /// </para>
+        /// </summary>
+        /// <param name="array">The array that will back the new buffer</param>
+        /// <param name="offset">
+        /// The offset of the subarray to be used; must be non-negative and
+        /// no larger than <c>array.length</c>.  The new buffer's position
+        /// will be set to this value.
+        /// </param>
+        /// <param name="length">
+        /// The length of the subarray to be used;
+        /// must be non-negative and no larger than
+        /// <c>array.Length - Offset</c>.
+        /// The new buffer's limit will be set to <c>Offset + Length</c>.
+        /// </param>
+        /// <returns>The new byte buffer</returns>
+        /// <exception cref="ArgumentOutOfRangeException">If the preconditions on the 
+        /// <paramref name="offset"/> and <paramref name="length"/> parameters do not hold</exception>
         public static ByteBuffer Wrap(byte[] array, int offset, int length)
         {
-            return new WrappedByteBuffer(-1, offset, offset + length, array.Length)
+            try
+            {
+                return new HeapByteBuffer(array, offset, length);
+            }
+            catch (ArgumentException x)
             {
-                _data = array,
-                _offset = 0
-            };
+                throw new ArgumentOutOfRangeException();
+            }
         }
 
+        /// <summary>
+        /// Wraps a byte array into a buffer.
+        /// 
+        /// <para>
+        /// The new buffer will be backed by the given byte array;
+        /// that is, modifications to the buffer will cause the array to be modified
+        /// and vice versa.  The new buffer's capacity will be
+        /// <c>array.Length</c>, its position will be <paramref name="offset"/>, its limit
+        /// will be <c>offset + length</c>, and its mark will be undefined.  Its
+        /// <see cref="Array">backing array</see> will be the given array, and
+        /// its <see cref="ArrayOffset">array offset</see> will be zero.
+        /// </para>
+        /// </summary>
+        /// <param name="array">The array that will back this buffer</param>
+        /// <returns>The new byte buffer</returns>
         public static ByteBuffer Wrap(byte[] array)
         {
-            return new WrappedByteBuffer(-1, 0, array.Length, array.Length)
-            {
-                _data = array,
-                _offset = 0
-            };
+            return Wrap(array, 0, array.Length);
         }
 
+        /// <summary>
+        /// Creates a new byte buffer whose content is a shared subsequence of
+        /// this buffer's content.
+        ///
+        /// <para> 
+        /// The content of the new buffer will start at this buffer's current
+        /// position.  Changes to this buffer's content will be visible in the new
+        /// buffer, and vice versa; the two buffers' position, limit, and mark
+        /// values will be independent.
+        ///
+        /// <p> The new buffer's position will be zero, its capacity and its limit
+        /// will be the number of bytes remaining in this buffer, and its mark
+        /// will be undefined.  The new buffer will be direct if, and only if, this
+        /// buffer is direct, and it will be read-only if, and only if, this buffer
+        /// is read-only.
+        /// </para>
+        /// </summary>
+        /// <returns>The new byte buffer</returns>
         public abstract ByteBuffer Slice();
 
+        /// <summary>
+        /// Creates a new byte buffer that shares this buffer's content.
+        ///
+        /// <para> 
+        /// The content of the new buffer will be that of this buffer.  Changes
+        /// to this buffer's content will be visible in the new buffer, and vice
+        /// versa; the two buffers' position, limit, and mark values will be
+        /// independent.
+        /// </para>
+        ///
+        /// <para> 
+        /// The new buffer's capacity, limit, position, and mark values will be
+        /// identical to those of this buffer.  The new buffer will be direct if,
+        /// and only if, this buffer is direct, and it will be read-only if, and
+        /// only if, this buffer is read-only.  
+        /// </para>
+        /// </summary>
+        /// <returns>The new byte buffer</returns>
         public abstract ByteBuffer Duplicate();
 
         public abstract ByteBuffer AsReadOnlyBuffer();
@@ -80,15 +339,16 @@ namespace Lucene.Net.Support
 
         public abstract ByteBuffer Put(int index, byte b);
 
+        // -- Bulk get operations --
+
         public virtual ByteBuffer Get(byte[] dst, int offset, int length)
         {
-            for (int i = offset; i < offset + length; i++)
-            {
-                // dst is being built in big-endian format (opposite of typical C#)
-                // When reading back, to make any sense of this, the bytes requested from the buffer
-                // MUST have their endianness flipped
+            CheckBounds(offset, length, dst.Length);
+            if (length > Remaining)
+                throw new BufferUnderflowException();
+            int end = offset + length;
+            for (int i = offset; i < end; i++)
                 dst[i] = Get();
-            }
 
             return this;
         }
@@ -98,9 +358,18 @@ namespace Lucene.Net.Support
             return Get(dst, 0, dst.Length);
         }
 
+        // -- Bulk put operations --
+
         public virtual ByteBuffer Put(ByteBuffer src)
         {
-            while (src.HasRemaining)
+            if (src == this)
+                throw new ArgumentException();
+            if (IsReadOnly)
+                throw new ReadOnlyBufferException();
+            int n = src.Remaining;
+            if (n > Remaining)
+                throw new BufferOverflowException();
+            for (int i = 0; i < n; i++)
                 Put(src.Get());
 
             return this;
@@ -108,9 +377,12 @@ namespace Lucene.Net.Support
 
         public virtual ByteBuffer Put(byte[] src, int offset, int length)
         {
-            for (int i = offset; i < offset + length; i++)
-                Put(src[i]);
-
+            CheckBounds(offset, length, src.Length);
+            if (length > Remaining)
+                throw new BufferOverflowException();
+            int end = offset + length;
+            for (int i = offset; i < end; i++)
+                this.Put(src[i]);
             return this;
         }
 
@@ -119,14 +391,132 @@ namespace Lucene.Net.Support
             return Put(src, 0, src.Length);
         }
 
+        // -- Other stuff --
+
+        public sealed override bool HasArray
+        {
+            get { return (hb != null) && !isReadOnly; }
+        }
+
+
+        public override object Array
+        {
+            get
+            {
+                if (hb == null)
+                    throw new InvalidOperationException();
+                if (isReadOnly)
+                    throw new ReadOnlyBufferException();
+                return hb;
+            }
+        }
+
+        public override int ArrayOffset
+        {
+            get
+            {
+                if (hb == null)
+                    throw new InvalidOperationException();
+                if (isReadOnly)
+                    throw new ReadOnlyBufferException();
+                return offset;
+            }
+        }
+
         public abstract ByteBuffer Compact();
 
+        public abstract override bool IsDirect { get; }
+
+        public override string ToString()
+        {
+            StringBuilder sb = new StringBuilder();
+            sb.Append(GetType().Name);
+            sb.Append("[pos=");
+            sb.Append(Position);
+            sb.Append(" lim=");
+            sb.Append(Limit);
+            sb.Append(" cap=");
+            sb.Append(Capacity);
+            sb.Append("]");
+            return sb.ToString();
+        }
+
+        public override int GetHashCode()
+        {
+            int h = 1;
+            int p = Position;
+            for (int i = Limit - 1; i >= p; i--)
+                h = 31 * h + (int)Get(i);
+            return h;
+        }
+
+        public override bool Equals(object obj)
+        {
+            if (this == obj)
+                return true;
+            if (!(obj is ByteBuffer))
+                return false;
+            ByteBuffer that = (ByteBuffer)obj;
+            if (this.Remaining != that.Remaining)
+                return false;
+            int p = this.Position;
+            for (int i = this.Limit - 1, j = that.Limit - 1; i >= p; i--, j--)
+                if (!Equals(this.Get(i), that.Get(j)))
+                    return false;
+            return true;
+        }
+
+        private static bool Equals(byte x, byte y)
+        {
+            return x == y;
+        }
+
         public int CompareTo(ByteBuffer other)
         {
-            // TODO: implement this
-            return 0;
+            int n = this.Position + Math.Min(this.Remaining, other.Remaining);
+            for (int i = this.Position, j = other.Position; i < n; i++, j++)
+            {
+                int cmp = Compare(this.Get(i), other.Get(j));
+                if (cmp != 0)
+                    return cmp;
+            }
+            return this.Remaining - other.Remaining;
+        }
+
+        private static int Compare(byte x, byte y)
+        {
+            // from Byte.compare(x, y)
+            return x - y;
+        }
+
+        // -- Other char stuff --
+
+        // (empty)
+
+        // -- Other byte stuff: Access to binary data --
+
+        internal bool bigEndian = true;
+        //bool nativeByteOrder = (Bits.byteOrder() == ByteOrder.BIG_ENDIAN);
+
+        public ByteOrder Order
+        {
+            get
+            {
+                return bigEndian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
+            }
+            set
+            {
+                bigEndian = (value == ByteOrder.BIG_ENDIAN);
+            }
         }
 
+        // Unchecked accessors, for use by ByteBufferAs-X-Buffer classes
+        //
+        internal abstract byte _get(int i);                          // package-private
+        internal abstract void _put(int i, byte b);                  // package-private
+
+
+
         public abstract char GetChar();
 
         public abstract ByteBuffer PutChar(char value);
@@ -165,7 +555,7 @@ namespace Lucene.Net.Support
 
         public abstract ByteBuffer PutLong(int index, long value);
 
-        //public abstract LongBuffer AsLongBuffer();
+        public abstract LongBuffer AsLongBuffer();
 
         public abstract float GetFloat();
 
@@ -187,334 +577,1052 @@ namespace Lucene.Net.Support
 
         //public abstract DoubleBuffer AsDoubleBuffer();
 
-        public class WrappedByteBuffer : ByteBuffer
+
+        public class HeapByteBuffer : ByteBuffer
         {
-            public WrappedByteBuffer(int mark, int pos, int lim, int cap)
-                : base(mark, pos, lim, cap)
+            // For speed these fields are actually declared in X-Buffer;
+            // these declarations are here as documentation
+            //protected readonly byte[] hb;
+            //protected readonly int offset;
+
+            internal HeapByteBuffer(int cap, int lim)
+                : base(-1, 0, lim, cap, new byte[cap], 0)
             {
+                /*
+                hb = new byte[cap];
+                offset = 0;
+                */
             }
 
-            public override bool IsDirect
+            internal HeapByteBuffer(int mark, int pos, int lim, int cap)
+                : base(mark, pos, lim, cap, new byte[cap], 0)
             {
-                get { return false; }
+                /*
+                hb = new byte[cap];
+                offset = 0;
+                */
             }
 
-            public override bool IsReadOnly
+            internal HeapByteBuffer(byte[] buf, int off, int len)
+                : base(-1, off, off + len, buf.Length, buf, 0)
+            {
+                /*
+                hb = buf;
+                offset = 0;
+                */
+            }
+
+            protected HeapByteBuffer(byte[] buf,
+                                           int mark, int pos, int lim, int cap,
+                                           int off)
+                : base(mark, pos, lim, cap, buf, off)
             {
-                get { return _readonly; }
+                /*
+                hb = buf;
+                offset = off;
+                */
             }
 
             public override ByteBuffer Slice()
             {
-                return new WrappedByteBuffer(-1, 0, Remaining, Remaining)
-                {
-                    _data = this._data,
-                    _offset = this._offset
-                };
+                return new HeapByteBuffer(hb,
+                                        -1,
+                                        0,
+                                        this.Remaining,
+                                        this.Remaining,
+                                        this.Position + offset);
             }
 
             public override ByteBuffer Duplicate()
             {
-                return new WrappedByteBuffer(Mark, Position, Limit, Capacity)
-                {
-                    _data = this._data,
-                    _offset = this._offset
-                };
+                return new HeapByteBuffer(hb,
+                                        this.MarkValue,
+                                        this.Position,
+                                        this.Limit,
+                                        this.Capacity,
+                                        offset);
             }
 
             public override ByteBuffer AsReadOnlyBuffer()
             {
-                throw new NotImplementedException();
+                return new HeapByteBufferR(hb,
+                                     this.MarkValue,
+                                     this.Position,
+                                     this.Limit,
+                                     this.Capacity,
+                                     offset);
+            }
+
+            protected int Ix(int i)
+            {
+                return i + offset;
             }
 
             public override byte Get()
             {
-                return _data[Position++];
+                return hb[Ix(NextGetIndex())];
             }
 
-            public override ByteBuffer Put(byte b)
+            public override byte Get(int i)
             {
-                _data[Position++] = b;
+                return hb[Ix(CheckIndex(i))];
+            }
+
+            public override ByteBuffer Get(byte[] dst, int offset, int length)
+            {
+                CheckBounds(offset, length, dst.Length);
+                if (length > Remaining)
+                    throw new BufferUnderflowException();
+                System.Buffer.BlockCopy(hb, Ix(Position), dst, offset, length);
+                SetPosition(Position + length);
                 return this;
             }
 
-            public override byte Get(int index)
+            public override bool IsDirect
             {
-                return _data[index];
+                get { return false; }
             }
 
-            public override ByteBuffer Put(int index, byte b)
+            public override bool IsReadOnly
+            {
+                get { return false; }
+            }
+
+            public override ByteBuffer Put(byte x)
             {
-                _data[index] = b;
+                hb[Ix(NextPutIndex())] = x;
                 return this;
             }
 
-            public override ByteBuffer Compact()
+            public override ByteBuffer Put(int i, byte x)
             {
-                if (Position == 0)
-                    return this;
+                hb[Ix(CheckIndex(i))] = x;
+                return this;
+            }
+
+            public override ByteBuffer Put(byte[] src, int offset, int length)
+            {
+                CheckBounds(offset, length, src.Length);
+                if (length > Remaining)
+                    throw new BufferOverflowException();
+                System.Buffer.BlockCopy(src, offset, hb, Ix(Position), length);
+                SetPosition(Position + length);
+                return this;
+            }
 
-                int p = Position;
-                for (int i = 0; i < Limit - 1; i++)
+            public override ByteBuffer Put(ByteBuffer src)
+            {
+                if (src is HeapByteBuffer)
                 {
-                    _data[i] = _data[p];
-                    p++;
+                    if (src == this)
+                        throw new ArgumentException();
+                    HeapByteBuffer sb = (HeapByteBuffer)src;
+                    int n = sb.Remaining;
+                    if (n > Remaining)
+                        throw new BufferOverflowException();
+                    System.Buffer.BlockCopy(sb.hb, sb.Ix(sb.Position),
+                                     hb, Ix(Position), n);
+                    sb.SetPosition(sb.Position + n);
+                    SetPosition(Position + n);
+                }
+                else if (src.IsDirect)
+                {
+                    int n = src.Remaining;
+                    if (n > Remaining)
+                        throw new BufferOverflowException();
+                    src.Get(hb, Ix(Position), n);
+                    SetPosition(Position + n);
+                }
+                else
+                {
+                    base.Put(src);
                 }
-
-                Position = Limit - Position;
-                Limit = Capacity;
-                Mark = -1;
-
                 return this;
             }
 
-            public override char GetChar()
+            public override ByteBuffer Compact()
             {
-                var c = BitConverter.ToChar(_data, Position);
-
-                Position += 2;
+                System.Buffer.BlockCopy(hb, Ix(Position), hb, Ix(0), Remaining);
+                SetPosition(Remaining);
+                SetLimit(Capacity);
+                DiscardMark();
+                return this;
+            }
 
-                return c;
+            internal override byte _get(int i)
+            {
+                return hb[i];
             }
 
-            public override ByteBuffer PutChar(char value)
+            internal override void _put(int i, byte b)
             {
-                var bytes = BitConverter.GetBytes(value);
+                hb[i] = b;
+            }
 
-                _data[Position++] = bytes[0];
-                _data[Position++] = bytes[1];
 
-                return this;
+            public override char GetChar()
+            {
+                var littleEndian = BitConverter.ToChar(hb, Ix(NextGetIndex(2)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
             }
 
-            public override char GetChar(int index)
+            public override char GetChar(int i)
             {
-                var c = BitConverter.ToChar(_data, index);
+                var littleEndian = BitConverter.ToChar(hb, Ix(CheckIndex(i, 2)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
+            }
+
+            public override ByteBuffer PutChar(char value)
+            {
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
+
+                hb[Ix(NextPutIndex())] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
 
-                return c;
+                return this;
             }
 
             public override ByteBuffer PutChar(int index, char value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[index++] = bytes[0];
-                _data[index++] = bytes[1];
+                hb[Ix(NextPutIndex(index))] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
 
                 return this;
             }
 
+            //public CharBuffer asCharBuffer()
+            //{
+            //    int size = this.remaining() >> 1;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (CharBuffer)(new ByteBufferAsCharBufferB(this,
+            //                                                           -1,
+            //                                                           0,
+            //                                                           size,
+            //                                                           size,
+            //                                                           off))
+            //            : (CharBuffer)(new ByteBufferAsCharBufferL(this,
+            //                                                           -1,
+            //                                                           0,
+            //                                                           size,
+            //                                                           size,
+            //                                                           off)));
+            //}
+
+            // short
+
             public override short GetShort()
             {
-                var c = BitConverter.ToInt16(_data, Position);
-
-                Position += 2;
+                var littleEndian = BitConverter.ToInt16(hb, Ix(NextGetIndex(2)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
+            }
 
-                return c;
+            public override short GetShort(int index)
+            {
+                var littleEndian = BitConverter.ToInt16(hb, Ix(CheckIndex(index, 2)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
             }
 
             public override ByteBuffer PutShort(short value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[Position++] = bytes[0];
-                _data[Position++] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
 
                 return this;
             }
 
-            public override short GetShort(int index)
-            {
-                var c = BitConverter.ToInt16(_data, index);
 
-                return c;
-            }
 
             public override ByteBuffer PutShort(int index, short value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[index++] = bytes[0];
-                _data[index++] = bytes[1];
+                hb[Ix(NextPutIndex(index))] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
 
                 return this;
             }
 
+            //public ShortBuffer asShortBuffer()
+            //{
+            //    int size = this.remaining() >> 1;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (ShortBuffer)(new ByteBufferAsShortBufferB(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off))
+            //            : (ShortBuffer)(new ByteBufferAsShortBufferL(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off)));
+            //}
+
+            // int
+
             public override int GetInt()
             {
-                var c = BitConverter.ToInt32(_data, Position);
-
-                Position += 4;
+                var littleEndian = BitConverter.ToInt32(hb, Ix(NextGetIndex(4)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
+            }
 
-                return c;
+            public override int GetInt(int index)
+            {
+                var littleEndian = BitConverter.ToInt32(hb, Ix(CheckIndex(index, 4)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
             }
 
             public override ByteBuffer PutInt(int value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[Position++] = bytes[0];
-                _data[Position++] = bytes[1];
-                _data[Position++] = bytes[2];
-                _data[Position++] = bytes[3];
+                hb[Ix(NextPutIndex())] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
 
                 return this;
             }
 
-            public override int GetInt(int index)
-            {
-                var c = BitConverter.ToInt32(_data, index);
-
-                return c;
-            }
-
             public override ByteBuffer PutInt(int index, int value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[index++] = bytes[0];
-                _data[index++] = bytes[1];
-                _data[index++] = bytes[2];
-                _data[index++] = bytes[3];
+                hb[Ix(NextPutIndex(index))] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
 
                 return this;
             }
 
+            //public IntBuffer asIntBuffer()
+            //{
+            //    int size = this.remaining() >> 2;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (IntBuffer)(new ByteBufferAsIntBufferB(this,
+            //                                                         -1,
+            //                                                         0,
+            //                                                         size,
+            //                                                         size,
+            //                                                         off))
+            //            : (IntBuffer)(new ByteBufferAsIntBufferL(this,
+            //                                                         -1,
+            //                                                         0,
+            //                                                         size,
+            //                                                         size,
+            //                                                         off)));
+            //}
+
+            // long
+
             public override long GetLong()
             {
-                var c = BitConverter.ToInt64(_data, Position);
-
-                Position += 8;
+                var littleEndian = BitConverter.ToInt64(hb, Ix(NextGetIndex(8)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
+            }
 
-                return c;
+            public override long GetLong(int index)
+            {
+                var littleEndian = BitConverter.ToInt64(hb, Ix(CheckIndex(index, 8)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
             }
 
             public override ByteBuffer PutLong(long value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[Position++] = bytes[0];
-                _data[Position++] = bytes[1];
-                _data[Position++] = bytes[2];
-                _data[Position++] = bytes[3];
-                _data[Position++] = bytes[4];
-                _data[Position++] = bytes[5];
-                _data[Position++] = bytes[6];
-                _data[Position++] = bytes[7];
+                hb[Ix(NextPutIndex())] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
+                hb[Ix(NextPutIndex())] = bytes[4];
+                hb[Ix(NextPutIndex())] = bytes[5];
+                hb[Ix(NextPutIndex())] = bytes[6];
+                hb[Ix(NextPutIndex())] = bytes[7];
 
                 return this;
             }
 
-            public override long GetLong(int index)
-            {
-                var c = BitConverter.ToInt64(_data, index);
 
-                return c;
-            }
 
             public override ByteBuffer PutLong(int index, long value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[index++] = bytes[0];
-                _data[index++] = bytes[1];
-                _data[index++] = bytes[2];
-                _data[index++] = bytes[3];
-                _data[index++] = bytes[4];
-                _data[index++] = bytes[5];
-                _data[index++] = bytes[6];
-                _data[index++] = bytes[7];
+                hb[Ix(NextPutIndex(index))] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
+                hb[Ix(NextPutIndex())] = bytes[4];
+                hb[Ix(NextPutIndex())] = bytes[5];
+                hb[Ix(NextPutIndex())] = bytes[6];
+                hb[Ix(NextPutIndex())] = bytes[7];
 
                 return this;
             }
 
-            public override float GetFloat()
+            public override LongBuffer AsLongBuffer()
             {
-                var c = BitConverter.ToSingle(_data, Position);
+                int size = this.Remaining >> 3;
+                int off = offset + Position;
+                return (new ByteBufferAsLongBuffer(bigEndian,
+                    this,
+                    -1,
+                    0,
+                    size,
+                    size,
+                    off));
+
+                //return (bigEndian
+                //        ? (LongBuffer)(new ByteBufferAsLongBufferB(this,
+                //                                                       -1,
+                //                                                       0,
+                //                                                       size,
+                //                                                       size,
+                //                                                       off))
+                //        : (LongBuffer)(new ByteBufferAsLongBufferL(this,
+                //                                                       -1,
+                //                                                       0,
+                //                                                       size,
+                //                                                       size,
+                //                                                       off)));
+            }
 
-                Position += 4;
+            public override float GetFloat()
+            {
+                byte[] temp = new byte[4];
+                System.Array.Copy(hb, Ix(NextGetIndex(4)), temp, 0, 4);
+                if (bigEndian)
+                {
+                    System.Array.Reverse(temp);
+                }
+                return BitConverter.ToSingle(temp, 0);
+            }
 
-                return c;
+            public override float GetFloat(int index)
+            {
+                var littleEndian = BitConverter.ToSingle(hb, Ix(CheckIndex(index, 4)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
             }
 
             public override ByteBuffer PutFloat(float value)
             {
                 var bytes = BitConverter.GetBytes(value);
 
-                _data[Position++] = bytes[0];
-                _data[Position++] = bytes[1];
-                _data[Position++] = bytes[2];
-                _data[Position++] = bytes[3];
+                if (bigEndian)
+                {
+                    System.Array.Reverse(bytes);
+                }
+
+                hb[Ix(NextPutIndex())] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
 
                 return this;
             }
 
-            public override float GetFloat(int index)
-            {
-                var c = BitConverter.ToSingle(_data, index);
 
-                return c;
-            }
 
             public override ByteBuffer PutFloat(int index, float value)
             {
                 var bytes = BitConverter.GetBytes(value);
 
-                _data[index++] = bytes[0];
-                _data[index++] = bytes[1];
-                _data[index++] = bytes[2];
-                _data[index++] = bytes[3];
+                if (bigEndian)
+                {
+                    System.Array.Reverse(bytes);
+                }
+
+                hb[Ix(NextPutIndex(index))] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
 
                 return this;
             }
 
+            //public FloatBuffer asFloatBuffer()
+            //{
+            //    int size = this.remaining() >> 2;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (FloatBuffer)(new ByteBufferAsFloatBufferB(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off))
+            //            : (FloatBuffer)(new ByteBufferAsFloatBufferL(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off)));
+            //}
+
+
+            // double
+
             public override double GetDouble()
             {
-                var c = BitConverter.ToDouble(_data, Position);
-
-                Position += 8;
+                var littleEndian = BitConverter.ToDouble(hb, Ix(NextGetIndex(8)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
+            }
 
-                return c;
+            public override double GetDouble(int index)
+            {
+                var littleEndian = BitConverter.ToDouble(hb, Ix(CheckIndex(index, 8)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
             }
 
             public override ByteBuffer PutDouble(double value)
             {
-                var bytes = BitConverter.GetBytes(value);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
 
-                _data[Position++] = bytes[0];
-                _data[Position++] = bytes[1];
-                _data[Position++] = bytes[2];
-                _data[Position++] = bytes[3];
-                _data[Position++] = bytes[4];
-                _data[Position++] = bytes[5];
-                _data[Position++] = bytes[6];
-                _data[Position++] = bytes[7];
+                hb[Ix(NextPutIndex())] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
+                hb[Ix(NextPutIndex())] = bytes[4];
+                hb[Ix(NextPutIndex())] = bytes[5];
+                hb[Ix(NextPutIndex())] = bytes[6];
+                hb[Ix(NextPutIndex())] = bytes[7];
 
                 return this;
             }
 
-            public override double GetDouble(int index)
+
+
+            public override ByteBuffer PutDouble(int index, double value)
             {
-                var c = BitConverter.ToDouble(_data, index);
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
+
+                hb[Ix(NextPutIndex(index))] = bytes[0];
+                hb[Ix(NextPutIndex())] = bytes[1];
+                hb[Ix(NextPutIndex())] = bytes[2];
+                hb[Ix(NextPutIndex())] = bytes[3];
+                hb[Ix(NextPutIndex())] = bytes[4];
+                hb[Ix(NextPutIndex())] = bytes[5];
+                hb[Ix(NextPutIndex())] = bytes[6];
+                hb[Ix(NextPutIndex())] = bytes[7];
 
-                return c;
+                return this;
             }
 
-            public override ByteBuffer PutDouble(int index, double value)
+            //public DoubleBuffer asDoubleBuffer()
+            //{
+            //    int size = this.remaining() >> 3;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (DoubleBuffer)(new ByteBufferAsDoubleBufferB(this,
+            //                                                               -1,
+            //                                                               0,
+            //                                                               size,
+            //                                                               size,
+            //                                                               off))
+            //            : (DoubleBuffer)(new ByteBufferAsDoubleBufferL(this,
+            //                                                               -1,
+            //                                                               0,
+            //                                                               size,
+            //                                                               size,
+            //                                                               off)));
+            //}
+        }
+
+        internal class HeapByteBufferR : HeapByteBuffer
+        {
+            internal HeapByteBufferR(int cap, int lim)
+                : base(cap, lim)
             {
-                var bytes = BitConverter.GetBytes(value);
+                this.isReadOnly = true;
+            }
+
+            internal HeapByteBufferR(byte[] buf, int off, int len)
+                : base(buf, off, len)
+            {
+                this.isReadOnly = true;
+            }
+
+            protected internal HeapByteBufferR(byte[] buf,
+                                           int mark, int pos, int lim, int cap,
+                                           int off)
+                : base(buf, mark, pos, lim, cap, off)
+            {
+                this.isReadOnly = true;
+            }
+
+            public override ByteBuffer Slice()
+            {
+                return new HeapByteBufferR(hb,
+                                                -1,
+                                                0,
+                                                this.Remaining,
+                                                this.Remaining,
+                                                this.Position + offset);
+            }
+
+            public override ByteBuffer Duplicate()
+            {
+                return new HeapByteBufferR(hb,
+                                                this.MarkValue,
+                                                this.Position,
+                                                this.Limit,
+                                                this.Capacity,
+                                                offset);
+            }
+
+            public override ByteBuffer AsReadOnlyBuffer()
+            {
+                return Duplicate();
+            }
+
+            public override bool IsReadOnly
+            {
+                get { return true; }
+            }
+
+            public override ByteBuffer Put(byte x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer Put(int i, byte x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer Put(byte[] src, int offset, int length)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer Put(ByteBuffer src)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer Compact()
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            internal override byte _get(int i)
+            {
+                return hb[i];
+            }
+
+            internal override void _put(int i, byte b)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            // char
+
+            public override ByteBuffer PutChar(char x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer PutChar(int i, char x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            //public override CharBuffer AsCharBuffer()
+            //{
+            //    int size = this.remaining() >> 1;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (CharBuffer)(new ByteBufferAsCharBufferRB(this,
+            //                                                           -1,
+            //                                                           0,
+            //                                                           size,
+            //                                                           size,
+            //                                                           off))
+            //            : (CharBuffer)(new ByteBufferAsCharBufferRL(this,
+            //                                                           -1,
+            //                                                           0,
+            //                                                           size,
+            //                                                           size,
+            //                                                           off)));
+            //}
+
+            // short
+
+            public override ByteBuffer PutShort(short x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer PutShort(int i, short x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            //public override ShortBuffer AsShortBuffer()
+            //{
+            //    int size = this.remaining() >> 1;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (ShortBuffer)(new ByteBufferAsShortBufferRB(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off))
+            //            : (ShortBuffer)(new ByteBufferAsShortBufferRL(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off)));
+            //}
+
+
+            // int
+
+            public override ByteBuffer PutInt(int x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer PutInt(int i, int x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            //public override IntBuffer AsIntBuffer()
+            //{
+            //    int size = this.remaining() >> 2;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (IntBuffer)(new ByteBufferAsIntBufferRB(this,
+            //                                                         -1,
+            //                                                         0,
+            //                                                         size,
+            //                                                         size,
+            //                                                         off))
+            //            : (IntBuffer)(new ByteBufferAsIntBufferRL(this,
+            //                                                         -1,
+            //                                                         0,
+            //                                                         size,
+            //                                                         size,
+            //                                                         off)));
+            //}
+
+
+            // long
+
+            public override ByteBuffer PutLong(long x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer PutLong(int i, long x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override LongBuffer AsLongBuffer()
+            {
+                throw new NotImplementedException();
+                //int size = this.remaining() >> 3;
+                //int off = offset + position();
+                //return (bigEndian
+                //        ? (LongBuffer)(new ByteBufferAsLongBufferRB(this,
+                //                                                       -1,
+                //                                                       0,
+                //                                                       size,
+                //                                                       size,
+                //                                                       off))
+                //        : (LongBuffer)(new ByteBufferAsLongBufferRL(this,
+                //                                                       -1,
+                //                                                       0,
+                //                                                       size,
+                //                                                       size,
+                //                                                       off)));
+            }
+
+            // float
+
+            public override ByteBuffer PutFloat(float x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer PutFloat(int i, float x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            //public override FloatBuffer AsFloatBuffer()
+            //{
+            //    int size = this.remaining() >> 2;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (FloatBuffer)(new ByteBufferAsFloatBufferRB(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off))
+            //            : (FloatBuffer)(new ByteBufferAsFloatBufferRL(this,
+            //                                                             -1,
+            //                                                             0,
+            //                                                             size,
+            //                                                             size,
+            //                                                             off)));
+            //}
+
+
+            // double
+
+            public override ByteBuffer PutDouble(double x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            public override ByteBuffer PutDouble(int i, double x)
+            {
+                throw new ReadOnlyBufferException();
+            }
+
+            //public override DoubleBuffer AsDoubleBuffer()
+            //{
+            //    int size = this.remaining() >> 3;
+            //    int off = offset + position();
+            //    return (bigEndian
+            //            ? (DoubleBuffer)(new ByteBufferAsDoubleBufferRB(this,
+            //                                                               -1,
+            //                                                               0,
+            //                                                               size,
+            //                                                               size,
+            //                                                               off))
+            //            : (DoubleBuffer)(new ByteBufferAsDoubleBufferRL(this,
+            //                                                               -1,
+            //                                                               0,
+            //                                                               size,
+            //                                                               size,
+            //                                                               off)));
+            //}
+        }
+
+
+        internal class ByteBufferAsLongBuffer : LongBuffer
+        {
+            protected readonly ByteBuffer bb;
+            new protected readonly int offset;
+            protected readonly bool bigEndian;
+
+            internal ByteBufferAsLongBuffer(bool bigEndian, ByteBuffer bb)
+                : base(-1, 0,
+                      bb.Remaining >> 3,
+                      bb.Remaining >> 3)
+            {   // package-private
+                this.bb = bb;
+                // enforce limit == capacity
+                int cap = this.Capacity;
+                this.SetLimit(cap);
+                int pos = this.Position;
+                Debug.Assert(pos <= cap);
+                offset = pos;
+                this.bigEndian = bigEndian;
+            }
+
+            internal ByteBufferAsLongBuffer(bool bigEndian, ByteBuffer bb,
+                                             int mark, int pos, int lim, int cap,
+                                             int off)
+                : base(mark, pos, lim, cap)
+            {
+                this.bb = bb;
+                offset = off;
+                this.bigEndian = bigEndian;
+            }
+
+            public override LongBuffer Slice()
+            {
+                int pos = this.Position;
+                int lim = this.Limit;
+                Debug.Assert(pos <= lim);
+                int rem = (pos <= lim ? lim - pos : 0);
+                int off = (pos << 3) + offset;
+                Debug.Assert(off >= 0);
+                return new ByteBufferAsLongBuffer(this.bigEndian, bb, -1, 0, rem, rem, off);
+            }
+
+            public override LongBuffer Duplicate()
+            {
+                return new ByteBufferAsLongBuffer(this.bigEndian,
+                                            bb,
+                                            this.MarkValue,
+                                            this.Position,
+                                            this.Limit,
+                                            this.Capacity,
+                                            offset);
+            }
 
-                _data[index++] = bytes[0];
-                _data[index++] = bytes[1];
-                _data[index++] = bytes[2];
-                _data[index++] = bytes[3];
-                _data[index++] = bytes[4];
-                _data[index++] = bytes[5];
-                _data[index++] = bytes[6];
-                _data[index++] = bytes[7];
+            public override LongBuffer AsReadOnlyBuffer()
+            {
+                throw new NotImplementedException();
+                //return new ByteBufferAsLongBufferRB(bb,
+                //                                         this.Mark,
+                //                                         this.position(),
+                //                                         this.limit(),
+                //                                         this.capacity(),
+                //                                         offset);
+            }
+
+            protected int Ix(int i)
+            {
+                return (i << 3) + offset;
+            }
+
+            public override long Get()
+            {
+                if (!bb.HasArray)
+                    throw new InvalidOperationException();
+
+                var littleEndian = BitConverter.ToInt64(bb.hb, Ix(NextGetIndex()));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
+            }
+
+            public override long Get(int index)
+            {
+                if (!bb.HasArray)
+                    throw new InvalidOperationException();
+
+                var littleEndian = BitConverter.ToInt64(bb.hb, Ix(CheckIndex(index)));
+                if (bigEndian)
+                {
+                    return Number.FlipEndian(littleEndian);
+                }
+                return littleEndian;
+            }
+
+            public override LongBuffer Put(long value)
+            {
+                PutImpl(Ix(NextPutIndex()), value);
+                return this;
+            }
+
+            public override LongBuffer Put(int index, long value)
+            {
+                PutImpl(Ix(CheckIndex(index)), value);
+                return this;
+            }
+
+            private void PutImpl(int index, long value)
+            {
+                var bytes = BitConverter.GetBytes(bigEndian ? Number.FlipEndian(value) : value);
+
+                bb._put(index, bytes[0]);
+                bb._put(index + 1, bytes[1]);
+                bb._put(index + 2, bytes[2]);
+                bb._put(index + 3, bytes[3]);
+                bb._put(index + 4, bytes[4]);
+                bb._put(index + 5, bytes[5]);
+                bb._put(index + 6, bytes[6]);
+                bb._put(index + 7, bytes[7]);
+            }
 
+
+            public override LongBuffer Compact()
+            {
+                int pos = Position;
+                int lim = Limit;
+                Debug.Assert(pos <= lim);
+                int rem = (pos <= lim ? lim - pos : 0);
+
+                ByteBuffer db = bb.Duplicate();
+                db.SetLimit(Ix(lim));
+                db.SetPosition(Ix(0));
+                ByteBuffer sb = db.Slice();
+                sb.SetPosition(pos << 3);
+                sb.Compact();
+                SetPosition(rem);
+                SetLimit(Capacity);
+                DiscardMark();
                 return this;
             }
+
+            public override bool IsDirect
+            {
+                get
+                {
+                    return bb.IsDirect;
+                }
+            }
+
+            public override bool IsReadOnly
+            {
+                get
+                {
+                    return false;
+                }
+            }
+
+            public override ByteOrder Order
+            {
+                get { return bigEndian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN; }
+            }
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Support/ByteOrder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/ByteOrder.cs b/src/Lucene.Net.Core/Support/ByteOrder.cs
new file mode 100644
index 0000000..ee9a12a
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/ByteOrder.cs
@@ -0,0 +1,17 @@
+\ufeffusing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Mimics Java's ByteOrder class
+    /// </summary>
+    public enum ByteOrder
+    {
+        BIG_ENDIAN,
+        LITTLE_ENDIAN
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Support/LongBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/LongBuffer.cs b/src/Lucene.Net.Core/Support/LongBuffer.cs
new file mode 100644
index 0000000..e1e41bf
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/LongBuffer.cs
@@ -0,0 +1,422 @@
+\ufeffusing System;
+using System.Text;
+
+namespace Lucene.Net.Support
+{
+    /// <summary>
+    /// Ported from Java's nio.LongBuffer
+    /// </summary>
+    public abstract class LongBuffer : Buffer, IComparable<LongBuffer>
+    {
+        // These fields are declared here rather than in Heap-X-Buffer in order to
+        // reduce the number of virtual method invocations needed to access these
+        // values, which is especially costly when coding small buffers.
+        //
+        internal readonly long[] hb;                  // Non-null only for heap buffers
+        internal readonly int offset;
+        internal bool isReadOnly;                 // Valid only for heap buffers
+
+        /// <summary>
+        /// Creates a new buffer with the given mark, position, limit, capacity, backing array, and array offset
+        /// </summary>
+        public LongBuffer(int mark, int pos, int lim, int cap,
+            long[] hb, int offset) 
+            : base(mark, pos, lim, cap)
+        {
+            this.hb = hb;
+            this.offset = offset;
+        }
+
+        /// <summary>
+        /// Creates a new buffer with the given mark, position, limit, and capacity
+        /// </summary>
+        public LongBuffer(int mark, int pos, int lim, int cap)
+            : this(mark, pos, lim, cap, null, 0)
+        {
+        }
+
+        public static LongBuffer Allocate(int capacity)
+        {
+            if (capacity < 0)
+                throw new ArgumentException();
+            return new HeapLongBuffer(capacity, capacity);
+        }
+
+
+        public static LongBuffer Wrap(long[] array,
+                                    int offset, int length)
+        {
+            try
+            {
+                return new HeapLongBuffer(array, offset, length);
+            }
+            catch (ArgumentException x)
+            {
+                throw new ArgumentOutOfRangeException();
+            }
+        }
+
+        public static LongBuffer Wrap(long[] array)
+        {
+            return Wrap(array, 0, array.Length);
+        }
+
+
+        public abstract LongBuffer Slice();
+
+        public abstract LongBuffer Duplicate();
+
+        public abstract LongBuffer AsReadOnlyBuffer();
+
+        public abstract long Get();
+
+        public abstract LongBuffer Put(long l);
+
+        public abstract long Get(int index);
+
+        public abstract LongBuffer Put(int index, long l);
+
+        // -- Bulk get operations --
+
+        public virtual LongBuffer Get(long[] dst, int offset, int length)
+        {
+            CheckBounds(offset, length, dst.Length);
+            if (length > Remaining)
+                throw new BufferUnderflowException();
+            int end = offset + length;
+            for (int i = offset; i < end; i++)
+                dst[i] = Get();
+            return this;
+        }
+
+        public virtual LongBuffer Get(long[] dst)
+        {
+            return Get(dst, 0, dst.Length);
+        }
+
+        // -- Bulk put operations --
+
+        public virtual LongBuffer Put(LongBuffer src)
+        {
+            if (src == this)
+                throw new ArgumentException();
+            if (IsReadOnly)
+                throw new ReadOnlyBufferException();
+            int n = src.Remaining;
+            if (n > Remaining)
+                throw new BufferOverflowException();
+            for (int i = 0; i < n; i++)
+                Put(src.Get());
+            return this;
+        }
+
+        public virtual LongBuffer Put(long[] src, int offset, int length)
+        {
+            CheckBounds(offset, length, src.Length);
+            if (length > Remaining)
+                throw new BufferOverflowException();
+            int end = offset + length;
+            for (int i = offset; i < end; i++)
+                this.Put(src[i]);
+            return this;
+        }
+
+        public LongBuffer Put(long[] src)
+        {
+            return Put(src, 0, src.Length);
+        }
+
+        public override bool HasArray
+        {
+            get
+            {
+                return (hb != null) && !isReadOnly;
+            }
+        }
+
+        public override object Array
+        {
+            get
+            {
+                if (hb == null)
+                    throw new InvalidOperationException();
+                if (isReadOnly)
+                    throw new ReadOnlyBufferException();
+                return hb;
+            }
+        }
+
+        public override int ArrayOffset
+        {
+            get
+            {
+                if (hb == null)
+                    throw new InvalidOperationException();
+                if (isReadOnly)
+                    throw new ReadOnlyBufferException();
+                return offset;
+            }
+        }
+
+        public abstract LongBuffer Compact();
+
+        //public override bool IsDirect { get; }
+
+        public override string ToString()
+        {
+            StringBuilder sb = new StringBuilder();
+            sb.Append(GetType().Name);
+            sb.Append("[pos=");
+            sb.Append(Position);
+            sb.Append(" lim=");
+            sb.Append(Limit);
+            sb.Append(" cap=");
+            sb.Append(Capacity);
+            sb.Append("]");
+            return sb.ToString();
+        }
+
+        public override int GetHashCode()
+        {
+            int h = 1;
+            int p = Position;
+            for (int i = Limit - 1; i >= p; i--)
+            {
+                h = 31 * h + (int)Get(i);
+            }
+            return h;
+        }
+
+        public override bool Equals(object obj)
+        {
+            if (this == obj)
+                return true;
+            if (!(obj is LongBuffer))
+            return false;
+            LongBuffer that = (LongBuffer)obj;
+            if (this.Remaining != that.Remaining)
+                return false;
+            int p = this.Position;
+            for (int i = this.Limit - 1, j = that.Limit - 1; i >= p; i--, j--)
+                if (!Equals(this.Get(i), that.Get(j)))
+                    return false;
+            return true;
+        }
+
+        private static bool Equals(long x, long y)
+        {
+            return x == y;
+        }
+
+        public int CompareTo(LongBuffer other)
+        {
+            int n = this.Position + Math.Min(this.Remaining, other.Remaining);
+            for (int i = this.Position, j = other.Position; i < n; i++, j++)
+            {
+                int cmp = Compare(this.Get(i), other.Get(j));
+                if (cmp != 0)
+                    return cmp;
+            }
+            return this.Remaining - other.Remaining;
+        }
+
+        private static int Compare(long x, long y)
+        {
+            // from Long.compare(x, y)
+            return (x < y) ? -1 : ((x == y) ? 0 : 1);
+        }
+
+        // -- Other char stuff --
+
+        // (empty)
+
+        // -- Other byte stuff: Access to binary data --
+
+        public abstract ByteOrder Order { get; }
+
+
+        public class HeapLongBuffer : LongBuffer
+        {
+            // For speed these fields are actually declared in X-Buffer;
+            // these declarations are here as documentation
+            /*
+
+            protected final long[] hb;
+            protected final int offset;
+
+            */
+
+            internal HeapLongBuffer(int cap, int lim)
+                : base(-1, 0, lim, cap, new long[cap], 0)
+            {
+                /*
+                hb = new long[cap];
+                offset = 0;
+                */
+            }
+
+            internal HeapLongBuffer(long[] buf, int off, int len)
+                : base(-1, off, off + len, buf.Length, buf, 0)
+            {
+                /*
+                hb = buf;
+                offset = 0;
+                */
+            }
+
+            protected HeapLongBuffer(long[] buf,
+                                   int mark, int pos, int lim, int cap,
+                                   int off)
+                : base(mark, pos, lim, cap, buf, off)
+            {
+                /*
+                hb = buf;
+                offset = off;
+                */
+            }
+
+            public override LongBuffer Slice()
+            {
+                return new HeapLongBuffer(hb,
+                                        -1,
+                                        0,
+                                        this.Remaining,
+                                        this.Remaining,
+                                        this.Position + offset);
+            }
+
+            public override LongBuffer Duplicate()
+            {
+                return new HeapLongBuffer(hb,
+                                        this.MarkValue,
+                                        this.Position,
+                                        this.Limit,
+                                        this.Capacity,
+                                        offset);
+            }
+
+            public override LongBuffer AsReadOnlyBuffer()
+            {
+                throw new NotImplementedException();
+                //return new HeapLongBufferR(hb,
+                //                     this.MarkValue(),
+                //                     this.Position,
+                //                     this.Limit,
+                //                     this.Capacity,
+                //                     offset);
+            }
+
+            protected virtual int Ix(int i)
+            {
+                return i + offset;
+            }
+
+            public override long Get()
+            {
+                return hb[Ix(NextGetIndex())];
+            }
+
+            public override long Get(int index)
+            {
+                return hb[Ix(CheckIndex(index))];
+            }
+
+            public override LongBuffer Get(long[] dst, int offset, int length)
+            {
+                CheckBounds(offset, length, dst.Length);
+                if (length > Remaining)
+                    throw new BufferUnderflowException();
+                System.Array.Copy(hb, Ix(Position), dst, offset, length);
+                SetPosition(Position + length);
+                return this;
+            }
+
+
+            public override bool IsDirect
+            {
+                get
+                {
+                    return false;
+                }
+            }
+
+            public override bool IsReadOnly
+            {
+                get
+                {
+                    return false;
+                }
+            }
+
+            public override LongBuffer Put(long l)
+            {
+                hb[Ix(NextPutIndex())] = l;
+                return this;
+            }
+
+            public override LongBuffer Put(int index, long l)
+            {
+                hb[Ix(CheckIndex(index))] = l;
+                return this;
+            }
+
+            public override LongBuffer Put(long[] src, int offset, int length)
+            {
+
+                CheckBounds(offset, length, src.Length);
+                if (length > Remaining)
+                    throw new BufferOverflowException();
+                System.Array.Copy(src, offset, hb, Ix(Position), length);
+                SetPosition(Position + length);
+                return this;
+            }
+
+            public override LongBuffer Put(LongBuffer src)
+            {
+
+                if (src is HeapLongBuffer) {
+                    if (src == this)
+                        throw new ArgumentException();
+                    HeapLongBuffer sb = (HeapLongBuffer)src;
+                    int n = sb.Remaining;
+                    if (n > Remaining)
+                        throw new BufferOverflowException();
+                    System.Array.Copy(sb.hb, sb.Ix(sb.Position),
+                                     hb, Ix(Position), n);
+                    sb.SetPosition(sb.Position + n);
+                    SetPosition(Position + n);
+                } else if (src.IsDirect)
+                {
+                    int n = src.Remaining;
+                    if (n > Remaining)
+                        throw new BufferOverflowException();
+                    src.Get(hb, Ix(Position), n);
+                    SetPosition(Position + n);
+                }
+                else
+                {
+                    base.Put(src);
+                }
+                return this;
+            }
+
+            public override LongBuffer Compact()
+            {
+                System.Array.Copy(hb, Ix(Position), hb, Ix(0), Remaining);
+                SetPosition(Remaining);
+                SetLimit(Capacity);
+                DiscardMark();
+                return this;
+            }
+
+            public override ByteOrder Order
+            {
+                get
+                {
+                    throw new NotImplementedException();
+                    //return ByteOrder.nativeOrder();
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs b/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
index affd1c1..1726bd7 100644
--- a/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
+++ b/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
@@ -13,6 +13,16 @@ namespace Lucene.Net.Support
             _accessor = accessor;
         }
 
+        internal override byte _get(int i)
+        {
+            throw new NotImplementedException();
+        }
+
+        internal override void _put(int i, byte b)
+        {
+            throw new NotImplementedException();
+        }
+
         public override bool IsDirect
         {
             get { return true; }
@@ -30,7 +40,7 @@ namespace Lucene.Net.Support
 
         public override ByteBuffer Duplicate()
         {
-            return new MemoryMappedFileByteBuffer(_accessor, Mark, Position, Limit, Capacity);
+            return new MemoryMappedFileByteBuffer(_accessor, MarkValue, Position, Limit, Capacity);
         }
 
         public override ByteBuffer AsReadOnlyBuffer()
@@ -275,5 +285,10 @@ namespace Lucene.Net.Support
 
             _accessor = null;
         }
+
+        public override LongBuffer AsLongBuffer()
+        {
+            throw new NotImplementedException();
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d235115d/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index 7d6d99f..e750cca 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -472,6 +472,9 @@
     <Compile Include="core\SupportClassException.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="core\Support\BaseBufferTestCase.cs" />
+    <Compile Include="core\Support\TestLongBuffer.cs" />
+    <Compile Include="core\Support\TestByteBuffer.cs" />
     <Compile Include="core\Support\TestLurchTable.cs" />
     <Compile Include="core\Support\TestLurchTableThreading.cs" />
     <Compile Include="core\TestAssertions.cs">


[06/50] [abbrv] lucenenet git commit: Added missing asserts in Core.Util.TestNumericUtils.TestLongConversionAndOrdering() and Core.Util.TestNumericUtils.TestIntConversionAndOrdering()

Posted by ni...@apache.org.
Added missing asserts in Core.Util.TestNumericUtils.TestLongConversionAndOrdering() and Core.Util.TestNumericUtils.TestIntConversionAndOrdering()


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

Branch: refs/heads/master
Commit: 5c4cffd41da929ee9a05cccc17aba8818e11e62e
Parents: aff0579
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 05:25:52 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:51 2016 +0700

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


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5c4cffd4/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs b/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
index b90c4b0..3d4267a 100644
--- a/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
@@ -38,7 +38,7 @@ namespace Lucene.Net.Util
                 {
                     // test if smaller
                     Assert.IsTrue(last.CompareTo(act) < 0, "actual bigger than last (BytesRef)");
-                    //Assert.IsTrue(last.Utf8ToString().CompareTo(act.Utf8ToString()) < 0, "actual bigger than last (as String)");
+                    Assert.IsTrue(last.Utf8ToString().CompareToOrdinal(act.Utf8ToString()) < 0, "actual bigger than last (as String)");
                 }
                 // test is back and forward conversion works
                 Assert.AreEqual(l, NumericUtils.PrefixCodedToLong(act), "forward and back conversion should generate same long");
@@ -60,7 +60,7 @@ namespace Lucene.Net.Util
                 {
                     // test if smaller
                     Assert.IsTrue(last.CompareTo(act) < 0, "actual bigger than last (BytesRef)");
-                    //Assert.IsTrue(last.Utf8ToString().CompareTo(act.Utf8ToString()) < 0, "actual bigger than last (as String)");
+                    Assert.IsTrue(last.Utf8ToString().CompareToOrdinal(act.Utf8ToString()) < 0, "actual bigger than last (as String)");
                 }
                 // test is back and forward conversion works
                 Assert.AreEqual(i, NumericUtils.PrefixCodedToInt(act), "forward and back conversion should generate same int");


[10/50] [abbrv] lucenenet git commit: Added missing tests to Core.Util.TestPriorityQueue + marked most existing tests with the LuceneNetSpecific attribute.

Posted by ni...@apache.org.
Added missing tests to Core.Util.TestPriorityQueue + marked most existing tests with the LuceneNetSpecific attribute.


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

Branch: refs/heads/master
Commit: bff016186333e0e1d19ff9b27d0f0b54b5e147ac
Parents: 335c1a8
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 06:00:36 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:52 2016 +0700

----------------------------------------------------------------------
 .../core/Util/TestPriorityQueue.cs              | 178 +++++++++++++------
 1 file changed, 120 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bff01618/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs b/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
index ed059c9..eb4275a 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
@@ -1,7 +1,7 @@
-using System.Collections.Generic;
+using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;
-using NUnit.Framework.Constraints;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Util
 {
@@ -50,6 +50,108 @@ namespace Lucene.Net.Util
             }
         }
 
+        public void TestPQ()
+        {
+            TestPQ(AtLeast(10000), Random());
+        }
+
+        public static void TestPQ(int count, Random gen)
+        {
+            PriorityQueue<int?> pq = new IntegerQueue(count);
+            int sum = 0, sum2 = 0;
+
+            for (int i = 0; i < count; i++)
+            {
+                int next = gen.Next();
+                sum += next;
+                pq.Add(next);
+            }
+
+            //      Date end = new Date();
+
+            //      System.out.print(((float)(end.getTime()-start.getTime()) / count) * 1000);
+            //      System.out.println(" microseconds/put");
+
+            //      start = new Date();
+
+            int last = int.MinValue;
+            for (int i = 0; i < count; i++)
+            {
+                var next = pq.Pop();
+                assertTrue(next.Value >= last);
+                last = next.Value;
+                sum2 += last;
+            }
+
+            assertEquals(sum, sum2);
+            //      end = new Date();
+
+            //      System.out.print(((float)(end.getTime()-start.getTime()) / count) * 1000);
+            //      System.out.println(" microseconds/pop");
+        }
+
+        [Test]
+        public virtual void TestClear()
+        {
+            PriorityQueue<int?> pq = new IntegerQueue(3);
+            pq.Add(2);
+            pq.Add(3);
+            pq.Add(1);
+            Assert.AreEqual(3, pq.Size());
+            pq.Clear();
+            Assert.AreEqual(0, pq.Size());
+        }
+
+        [Test]
+        public void TestFixedSize()
+        {
+            PriorityQueue<int?> pq = new IntegerQueue(3);
+            pq.InsertWithOverflow(2);
+            pq.InsertWithOverflow(3);
+            pq.InsertWithOverflow(1);
+            pq.InsertWithOverflow(5);
+            pq.InsertWithOverflow(7);
+            pq.InsertWithOverflow(1);
+            assertEquals(3, pq.Size());
+            assertEquals((int?)3, pq.Top());
+        }
+
+        [Test]
+        public virtual void TestInsertWithOverflow()
+        {
+            // Tests that InsertWithOverflow discards the correct value,
+            // and the resulting PQ preserves its structure
+
+            int size = 4;
+            PriorityQueue<int?> pq = new IntegerQueue(size);
+            int? i1 = 2;
+            int? i2 = 3;
+            int? i3 = 1;
+            int? i4 = 5;
+            int? i5 = 7;
+            int? i6 = 1;
+
+            Assert.IsNull(pq.InsertWithOverflow(i1));
+            Assert.IsNull(pq.InsertWithOverflow(i2));
+            Assert.IsNull(pq.InsertWithOverflow(i3));
+            Assert.IsNull(pq.InsertWithOverflow(i4));
+            Assert.IsTrue(pq.InsertWithOverflow(i5) == i3); // i3 should have been dropped
+            Assert.IsTrue(pq.InsertWithOverflow(i6) == i6); // i6 should not have been inserted
+            Assert.AreEqual(size, pq.Size());
+            Assert.AreEqual((int?)2, pq.Top());
+
+            // LUCENENET SPECIFIC
+            pq.Pop();
+            Assert.AreEqual((int?)3, pq.Top());
+            pq.Pop();
+            Assert.AreEqual((int?)5, pq.Top());
+            pq.Pop();
+            Assert.AreEqual((int?)7, pq.Top());
+        }
+
+
+        #region LUCENENET SPECIFIC TESTS
+
         private class IntegerQueueWithSentinel : IntegerQueue
         {
             public IntegerQueueWithSentinel(int count, bool prepopulate)
@@ -109,7 +211,7 @@ namespace Lucene.Net.Util
         } 
 
         [Ignore] // Increase heap size to run this test
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestMaxSizeBounds()
         {
             // Minimum size is 0
@@ -146,7 +248,7 @@ namespace Lucene.Net.Util
             }
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestPrepopulation()
         {
             int maxSize = 10;
@@ -168,7 +270,7 @@ namespace Lucene.Net.Util
             Assert.AreEqual(pq.Size(), expectedSize);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestAdd()
         {
             int maxSize = 10;
@@ -198,7 +300,7 @@ namespace Lucene.Net.Util
             AddAndTest(pq, -111111, -111111, 5);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestDuplicates()
         {
             // Tests that the queue doesn't absorb elements with duplicate keys
@@ -219,7 +321,7 @@ namespace Lucene.Net.Util
             Assert.AreEqual(pq.Size(), 7);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestPop()
         {
             int maxSize = 10;
@@ -277,7 +379,7 @@ namespace Lucene.Net.Util
             pq.Pop();
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestUpdateTop()
         {
             // Mostly to reflect the usage of UpdateTop
@@ -306,7 +408,7 @@ namespace Lucene.Net.Util
             Assert.AreEqual(pq.Top().Field, 1);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestOverflow()
         {
             // Tests adding elements to full queues
@@ -343,7 +445,7 @@ namespace Lucene.Net.Util
             }
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestResize()
         {
             // Initialize a resizable queue
@@ -377,7 +479,7 @@ namespace Lucene.Net.Util
             Assert.AreEqual(pq.Size(), 18);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestIntegrityAfterResize()
         {
             // Tests that after a resize, the queue keeps working fine
@@ -412,19 +514,9 @@ namespace Lucene.Net.Util
             Assert.AreEqual(pq.Top(), -2);
         }
 
-        [Test]
-        public virtual void TestClear()
-        {
-            PriorityQueue<int?> pq = new IntegerQueue(3);
-            pq.Add(2);
-            pq.Add(3);
-            pq.Add(1);
-            Assert.AreEqual(3, pq.Size());
-            pq.Clear();
-            Assert.AreEqual(0, pq.Size());
-        }
+        
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public virtual void TestInsertWithOverflowDoesNotOverflow()
         {
             // Tests that InsertWithOverflow does not cause overflow
@@ -440,38 +532,6 @@ namespace Lucene.Net.Util
             Assert.AreEqual((int?)3, pq.Top());
         }
 
-        [Test]
-        public virtual void TestInsertWithOverflowDiscardsRight()
-        {
-            // Tests that InsertWithOverflow discards the correct value,
-            // and the resulting PQ preserves its structure
-
-            int size = 4;
-            PriorityQueue<int?> pq = new IntegerQueue(size);
-            int? i1 = 2;
-            int? i2 = 3;
-            int? i3 = 1;
-            int? i4 = 5;
-            int? i5 = 7;
-            int? i6 = 1;
-
-            Assert.IsNull(pq.InsertWithOverflow(i1));
-            Assert.IsNull(pq.InsertWithOverflow(i2));
-            Assert.IsNull(pq.InsertWithOverflow(i3));
-            Assert.IsNull(pq.InsertWithOverflow(i4));
-            Assert.IsTrue(pq.InsertWithOverflow(i5) == i3); // i3 should have been dropped
-            Assert.IsTrue(pq.InsertWithOverflow(i6) == i6); // i6 should not have been inserted
-            Assert.AreEqual(size, pq.Size());
-            Assert.AreEqual((int?)2, pq.Top());
-
-            pq.Pop();
-            Assert.AreEqual((int?)3, pq.Top());
-            pq.Pop();
-            Assert.AreEqual((int?)5, pq.Top());
-            pq.Pop();
-            Assert.AreEqual((int?)7, pq.Top());
-        }
-
         private static void AddElements<T>(PriorityQueue<T> pq, T[] elements)
         {
             int size = (int)elements.size();
@@ -542,7 +602,7 @@ namespace Lucene.Net.Util
             System.Console.WriteLine("Average time per pop: {0} ticks", total.Ticks / size);
         }
 
-        [Test]
+        [Test, LuceneNetSpecific]
         public static void TestPersistence()
         {
             // Tests that a big number of elements are added and popped (in the correct order)
@@ -564,7 +624,7 @@ namespace Lucene.Net.Util
             PopAndTestElements(pq, elements);
         }
 
-        [Test, Timeout(0)]
+        [Test, LuceneNetSpecific]
         public static void TestStress()
         {
             int atLeast = 1000000;
@@ -613,7 +673,7 @@ namespace Lucene.Net.Util
             Assert.AreEqual(pq.Size(), 0);
         }
 
-        [Test, Explicit]
+        [Test, Explicit, LuceneNetSpecific]
         public static void Benchmarks()
         {
             AssumeTrue("Turn VERBOSE on or otherwise you won't see the results.", VERBOSE);
@@ -646,5 +706,7 @@ namespace Lucene.Net.Util
             TimedAddAndPop<int?>(pq, elements);
             pq.Clear();
         }
+
+        #endregion
     }
 }
\ No newline at end of file


[13/50] [abbrv] lucenenet git commit: Fixed bug in Core.Index.TestConcurrentMergeScheduler.TestFlushExceptions() that caused it not to finish.

Posted by ni...@apache.org.
Fixed bug in Core.Index.TestConcurrentMergeScheduler.TestFlushExceptions() that caused it not to finish.


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

Branch: refs/heads/master
Commit: 575630da594c51706a8e0349fcb44870e22baff2
Parents: 6441534
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 10:18:01 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:54 2016 +0700

----------------------------------------------------------------------
 .../core/Index/TestConcurrentMergeScheduler.cs                 | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/575630da/src/Lucene.Net.Tests/core/Index/TestConcurrentMergeScheduler.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestConcurrentMergeScheduler.cs b/src/Lucene.Net.Tests/core/Index/TestConcurrentMergeScheduler.cs
index 0d347ed..c4abaf2 100644
--- a/src/Lucene.Net.Tests/core/Index/TestConcurrentMergeScheduler.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestConcurrentMergeScheduler.cs
@@ -79,11 +79,11 @@ namespace Lucene.Net.Index
                         {
                             break;
                         }
-                        if ("flush".Equals(method.Name))
+                        if ("Flush".Equals(method.Name))
                         {
                             isDoFlush = true;
                         }
-                        if ("close".Equals(method.Name))
+                        if ("Close".Equals(method.Name))
                         {
                             isClose = true;
                         }
@@ -103,8 +103,6 @@ namespace Lucene.Net.Index
         [Test]
         public virtual void TestFlushExceptions()
         {
-            fail("Test has infinite recursion");
-
             MockDirectoryWrapper directory = NewMockDirectory();
             FailOnlyOnFlush failure = new FailOnlyOnFlush(this);
             directory.FailOn(failure);


[40/50] [abbrv] lucenenet git commit: Fixed number conversion bug in Queries.Function.TestDocValuesFieldSources

Posted by ni...@apache.org.
Fixed number conversion bug in Queries.Function.TestDocValuesFieldSources


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

Branch: refs/heads/master
Commit: 1fe048c430f9ecd47fee8e393475616c4a264ace
Parents: 4a8a6f1
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 23 17:59:43 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:47 2016 +0700

----------------------------------------------------------------------
 .../Function/TestDocValuesFieldSources.cs                     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1fe048c4/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs b/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
index 621c6eb..f567221 100644
--- a/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
+++ b/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
@@ -1,5 +1,4 @@
-\ufeffusing System;
-using Lucene.Net.Analysis;
+\ufeffusing Lucene.Net.Analysis;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
 using Lucene.Net.Queries.Function;
@@ -10,6 +9,8 @@ using Lucene.Net.Support;
 using Lucene.Net.Util;
 using Lucene.Net.Util.Packed;
 using NUnit.Framework;
+using System;
+using System.Globalization;
 
 namespace Lucene.Net.Tests.Queries.Function
 {
@@ -123,7 +124,7 @@ namespace Lucene.Net.Tests.Queries.Function
                             assertEquals(new BytesRef((string)expected), bytes);
                             break;
                         case FieldInfo.DocValuesType_e.NUMERIC:
-                            assertEquals(Number.ToInt64(expected.ToString()), values.LongVal(i));
+                            assertEquals(Convert.ToInt64(expected, CultureInfo.InvariantCulture), values.LongVal(i));
                             break;
                     }
                 }


[27/50] [abbrv] lucenenet git commit: Fixed bugs with keeping track of the current position in Core.Support.MemoryMappedFileByteBuffer

Posted by ni...@apache.org.
Fixed bugs with keeping track of the current position in Core.Support.MemoryMappedFileByteBuffer


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

Branch: refs/heads/master
Commit: 302c7adaf9c2e7ce52042d3d24847b4bd64f2f32
Parents: cd60689
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Oct 19 07:04:46 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:58 2016 +0700

----------------------------------------------------------------------
 .../Support/MemoryMappedFileByteBuffer.cs       | 294 ++++++++++---------
 1 file changed, 162 insertions(+), 132 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/302c7ada/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs b/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
index 1726bd7..1b388f1 100644
--- a/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
+++ b/src/Lucene.Net.Core/Support/MemoryMappedFileByteBuffer.cs
@@ -6,6 +6,8 @@ namespace Lucene.Net.Support
     internal sealed class MemoryMappedFileByteBuffer : ByteBuffer, IDisposable
     {
         private MemoryMappedViewAccessor _accessor;
+        private readonly int offset; // always 0 (add constructors to fix this)
+        new private bool bigEndian = true;
 
         public MemoryMappedFileByteBuffer(MemoryMappedViewAccessor accessor, int mark, int pos, int lim, int cap)
             : base(mark, pos, lim, cap)
@@ -13,60 +15,56 @@ namespace Lucene.Net.Support
             _accessor = accessor;
         }
 
-        internal override byte _get(int i)
+        public override ByteBuffer Slice()
         {
-            throw new NotImplementedException();
+            return new MemoryMappedFileByteBuffer(_accessor, -1, 0, Remaining, Remaining);
         }
 
-        internal override void _put(int i, byte b)
+        public override ByteBuffer Duplicate()
         {
-            throw new NotImplementedException();
+            return new MemoryMappedFileByteBuffer(_accessor, MarkValue, Position, Limit, Capacity);
         }
 
-        public override bool IsDirect
+        public override ByteBuffer AsReadOnlyBuffer()
         {
-            get { return true; }
+            throw new NotImplementedException();
         }
 
-        public override bool IsReadOnly
+
+        private int Ix(int i)
         {
-            get { return false; }
+            return i + offset;
         }
 
-        public override ByteBuffer Slice()
+        public override byte Get()
         {
-            return new MemoryMappedFileByteBuffer(_accessor, -1, 0, Remaining, Remaining);
+            return _accessor.ReadByte(Ix(NextGetIndex()));
         }
 
-        public override ByteBuffer Duplicate()
+        public override byte Get(int index)
         {
-            return new MemoryMappedFileByteBuffer(_accessor, MarkValue, Position, Limit, Capacity);
+            return _accessor.ReadByte(Ix(CheckIndex(index)));
         }
 
-        public override ByteBuffer AsReadOnlyBuffer()
+        public override bool IsDirect
         {
-            throw new NotImplementedException();
+            get { return false; }
         }
 
-        public override byte Get()
+        public override bool IsReadOnly
         {
-            return _accessor.ReadByte(Position++);
+            get { return false; }
         }
 
         public override ByteBuffer Put(byte b)
         {
-            _accessor.Write(Position++, b);
+            _accessor.Write(Ix(NextPutIndex()), b);
             return this;
         }
 
-        public override byte Get(int index)
-        {
-            return _accessor.ReadByte(index);
-        }
-
         public override ByteBuffer Put(int index, byte b)
         {
-            _accessor.Write(index, b);
+            _accessor.Write(Ix(CheckIndex(index)), b);
             return this;
         }
 
@@ -75,206 +73,238 @@ namespace Lucene.Net.Support
             throw new NotSupportedException();
         }
 
-        public override char GetChar()
+        internal override byte _get(int i)
         {
-            char c = _accessor.ReadChar(Position);
-            Position += 2;
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            throw new NotSupportedException();
         }
 
-        public override ByteBuffer PutChar(char value)
+        internal override void _put(int i, byte b)
         {
-            //conform to how the index was written
-            _accessor.Write(Position, Number.FlipEndian(value));
-            Position += 2;
+            throw new NotSupportedException();
+        }
 
-            return this;
+
+        public override char GetChar()
+        {
+            var littleEndian = _accessor.ReadChar(Ix(NextGetIndex(2)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
         public override char GetChar(int index)
         {
-            var c = _accessor.ReadChar(index);
+            var littleEndian = _accessor.ReadChar(Ix(CheckIndex(index, 2)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
+        }
 
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+        public override ByteBuffer PutChar(char value)
+        {
+            _accessor.Write(Ix(NextPutIndex(2)), bigEndian ? Number.FlipEndian(value) : value);
+            return this;
         }
 
+        
+
         public override ByteBuffer PutChar(int index, char value)
         {
-            _accessor.Write(index, Number.FlipEndian(value));
-
+            _accessor.Write(Ix(CheckIndex(index, 2)), bigEndian ? Number.FlipEndian(value) : value);
             return this;
         }
 
         public override short GetShort()
         {
-            var c = _accessor.ReadInt16(Position);
-            Position += 2;
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            var littleEndian = _accessor.ReadInt16(Ix(NextGetIndex(2)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
-        public override ByteBuffer PutShort(short value)
+        public override short GetShort(int index)
         {
-            //conform to how the index was written
-            _accessor.Write(Position, Number.FlipEndian(value));
-            Position += 2;
-
-            return this;
+            var littleEndian = _accessor.ReadInt16(Ix(CheckIndex(index, 2)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
-        public override short GetShort(int index)
+        public override ByteBuffer PutShort(short value)
         {
-            var c = _accessor.ReadInt16(index);
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            _accessor.Write(Ix(NextPutIndex(2)), bigEndian ? Number.FlipEndian(value) : value);
+            return this;
         }
 
         public override ByteBuffer PutShort(int index, short value)
         {
-            //conform to how the index was written
-            _accessor.Write(index, Number.FlipEndian(value));
-
+            _accessor.Write(Ix(CheckIndex(index, 2)), bigEndian ? Number.FlipEndian(value) : value);
             return this;
         }
 
         public override int GetInt()
         {
-            var c = _accessor.ReadInt32(Position);
-            Position += 4;
+            var littleEndian = _accessor.ReadInt32(Ix(NextGetIndex(4)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
+        }
 
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+        public override int GetInt(int index)
+        {
+            var littleEndian = _accessor.ReadInt32(Ix(CheckIndex(index, 4)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
         public override ByteBuffer PutInt(int value)
         {
-            //conform to how the index was written
-            _accessor.Write(Position, Number.FlipEndian(value));
-            Position += 4;
-
+            _accessor.Write(Ix(NextPutIndex(4)), bigEndian ? Number.FlipEndian(value) : value);
             return this;
         }
 
-        public override int GetInt(int index)
-        {
-            var c = _accessor.ReadInt32(index);
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
-        }
+        
 
         public override ByteBuffer PutInt(int index, int value)
         {
-            //conform to how the index was written
-            _accessor.Write(index, Number.FlipEndian(value));
-
+            _accessor.Write(Ix(CheckIndex(index, 4)), bigEndian ? Number.FlipEndian(value) : value);
             return this;
         }
 
         public override long GetLong()
         {
-            var c = _accessor.ReadInt64(Position);
-            Position += 8;
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            var littleEndian = _accessor.ReadInt64(Ix(NextGetIndex(8)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
-        public override ByteBuffer PutLong(long value)
+        public override long GetLong(int index)
         {
-            //conform to how the index was written
-            _accessor.Write(Position, Number.FlipEndian(value));
-            Position += 8;
-
-            return this;
+            var littleEndian = _accessor.ReadInt64(Ix(CheckIndex(index, 8)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
-        public override long GetLong(int index)
+        public override ByteBuffer PutLong(long value)
         {
-            var c = _accessor.ReadInt64(index);
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            _accessor.Write(Ix(NextPutIndex(8)), bigEndian ? Number.FlipEndian(value) : value);
+            return this;
         }
 
         public override ByteBuffer PutLong(int index, long value)
         {
-            //conform to how the index was written
-            _accessor.Write(index, Number.FlipEndian(value));
-
+            _accessor.Write(Ix(CheckIndex(index, 8)), bigEndian ? Number.FlipEndian(value) : value);
             return this;
         }
 
         public override float GetFloat()
         {
-            var c = _accessor.ReadSingle(Position);
-            Position += 4;
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            byte[] temp = new byte[4];
+            temp[0] = _accessor.ReadByte(Ix(NextGetIndex()));
+            temp[1] = _accessor.ReadByte(Ix(NextGetIndex()));
+            temp[2] = _accessor.ReadByte(Ix(NextGetIndex()));
+            temp[3] = _accessor.ReadByte(Ix(NextGetIndex()));
+            if (bigEndian)
+            {
+                System.Array.Reverse(temp);
+            }
+            return BitConverter.ToSingle(temp, 0);
         }
 
-        public override ByteBuffer PutFloat(float value)
+        public override float GetFloat(int index)
         {
-            //conform to how the index was written
-            _accessor.Write(Position, Number.FlipEndian(value));
-            Position += 4;
-
-            return this;
+            byte[] temp = new byte[4];
+            temp[0] = _accessor.ReadByte(Ix(NextGetIndex(index)));
+            temp[1] = _accessor.ReadByte(Ix(NextGetIndex()));
+            temp[2] = _accessor.ReadByte(Ix(NextGetIndex()));
+            temp[3] = _accessor.ReadByte(Ix(NextGetIndex()));
+            if (bigEndian)
+            {
+                System.Array.Reverse(temp);
+            }
+            return BitConverter.ToSingle(temp, 0);
         }
 
-        public override float GetFloat(int index)
+        public override ByteBuffer PutFloat(float value)
         {
-            var c = _accessor.ReadSingle(index);
+            var bytes = BitConverter.GetBytes(value);
 
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            if (bigEndian)
+            {
+                System.Array.Reverse(bytes);
+            }
+
+            _accessor.Write(Ix(NextPutIndex()), bytes[0]);
+            _accessor.Write(Ix(NextPutIndex()), bytes[1]);
+            _accessor.Write(Ix(NextPutIndex()), bytes[2]);
+            _accessor.Write(Ix(NextPutIndex()), bytes[3]);
+            return this;
         }
 
         public override ByteBuffer PutFloat(int index, float value)
         {
-            //conform to how the index was written
-            _accessor.Write(index, Number.FlipEndian(value));
+            var bytes = BitConverter.GetBytes(value);
+
+            if (bigEndian)
+            {
+                System.Array.Reverse(bytes);
+            }
 
+            _accessor.Write(Ix(NextPutIndex(index)), bytes[0]);
+            _accessor.Write(Ix(NextPutIndex()), bytes[1]);
+            _accessor.Write(Ix(NextPutIndex()), bytes[2]);
+            _accessor.Write(Ix(NextPutIndex()), bytes[3]);
             return this;
         }
 
         public override double GetDouble()
         {
-            var c = _accessor.ReadDouble(Position);
-            Position += 4;
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            var littleEndian = _accessor.ReadDouble(Ix(NextGetIndex(8)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
-        public override ByteBuffer PutDouble(double value)
+        public override double GetDouble(int index)
         {
-            //conform to how the index was written
-            _accessor.Write(Position, Number.FlipEndian(value));
-            Position += 8;
-
-            return this;
+            var littleEndian = _accessor.ReadDouble(Ix(CheckIndex(index, 8)));
+            if (bigEndian)
+            {
+                return Number.FlipEndian(littleEndian);
+            }
+            return littleEndian;
         }
 
-        public override double GetDouble(int index)
+        public override ByteBuffer PutDouble(double value)
         {
-            var c = _accessor.ReadDouble(index);
-
-            //conform to how the index was written
-            return Number.FlipEndian(c);
+            _accessor.Write(Ix(NextPutIndex(8)), bigEndian ? Number.FlipEndian(value) : value);
+            return this;
         }
 
         public override ByteBuffer PutDouble(int index, double value)
         {
-            //conform to how the index was written
-            _accessor.Write(index, Number.FlipEndian(value));
-
+            _accessor.Write(Ix(CheckIndex(index, 8)), bigEndian ? Number.FlipEndian(value) : value);
             return this;
         }
 
@@ -288,7 +318,7 @@ namespace Lucene.Net.Support
 
         public override LongBuffer AsLongBuffer()
         {
-            throw new NotImplementedException();
+            throw new NotSupportedException();
         }
     }
 }
\ No newline at end of file


[50/50] [abbrv] lucenenet git commit: Ported tests for Support.DataInputStream and Support.DataOutputStream from Java and fixed bugs.

Posted by ni...@apache.org.
Ported tests for Support.DataInputStream and Support.DataOutputStream from Java and fixed bugs.


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

Branch: refs/heads/master
Commit: dec66102d31b091a03a3b8b4233d87f1b03e86ad
Parents: 2952508
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Oct 6 00:26:59 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:44:35 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Support/DataInputStream.cs  |  20 +-
 src/Lucene.Net.Core/Support/DataOutputStream.cs |   9 +
 src/Lucene.Net.Tests/Lucene.Net.Tests.csproj    |   5 +
 src/Lucene.Net.Tests/core/Support/ReadFully.txt |  14 ++
 .../core/Support/TestDataInputStream.cs         | 224 +++++++++++++++++++
 .../core/Support/TestDataOutputStream.cs        | 172 ++++++++++++++
 6 files changed, 443 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/dec66102/src/Lucene.Net.Core/Support/DataInputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/DataInputStream.cs b/src/Lucene.Net.Core/Support/DataInputStream.cs
index 30dc6a6..b135125 100644
--- a/src/Lucene.Net.Core/Support/DataInputStream.cs
+++ b/src/Lucene.Net.Core/Support/DataInputStream.cs
@@ -7,6 +7,10 @@ namespace Lucene.Net.Support
     /// Java's DataInputStream is similar to .NET's BinaryReader. However, it reads
     /// using a modified UTF-8 format that cannot be read using BinaryReader.
     /// This is a port of DataInputStream that is fully compatible with Java's DataOutputStream.
+    /// <para>
+    /// Usage Note: Always favor BinaryReader over DataInputStream unless you specifically need
+    /// the modified UTF-8 format and/or the <see cref="ReadUTF(IDataInput)"/> method.
+    /// </para>
     /// </summary>
     public class DataInputStream : IDataInput, IDisposable
     {
@@ -62,7 +66,7 @@ namespace Lucene.Net.Support
             int total = 0;
             int cur = 0;
 
-            while ((total < n) && ((cur = (int)@in.Seek(n - total, SeekOrigin.Begin)) > 0))
+            while ((total < n) && ((cur = Skip(@in, n - total)) > 0))
             {
                 total += cur;
             }
@@ -70,6 +74,20 @@ namespace Lucene.Net.Support
             return total;
         }
 
+        /// <summary>
+        /// Helper method for SkipBytes, since Position and Seek do not work on
+        /// non-seekable streams.
+        /// </summary>
+        private static int Skip(Stream stream, int n)
+        {
+            int total = 0;
+            while (total < n && stream.ReadByte() > -1)
+            {
+                total++;
+            }
+            return total;
+        }
+
         public bool ReadBoolean()
         {
             int ch = @in.ReadByte();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/dec66102/src/Lucene.Net.Core/Support/DataOutputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/DataOutputStream.cs b/src/Lucene.Net.Core/Support/DataOutputStream.cs
index 518dba7..b1e755e 100644
--- a/src/Lucene.Net.Core/Support/DataOutputStream.cs
+++ b/src/Lucene.Net.Core/Support/DataOutputStream.cs
@@ -8,6 +8,10 @@ namespace Lucene.Net.Support
     /// Java's DataOutputStream is similar to .NET's BinaryWriter. However, it writes
     /// in a modified UTF-8 format that cannot be read (or duplicated) using BinaryWriter.
     /// This is a port of DataOutputStream that is fully compatible with Java's DataInputStream.
+    /// <para>
+    /// Usage Note: Always favor BinaryWriter over DataOutputStream unless you specifically need
+    /// the modified UTF-8 format and/or the <see cref="WriteUTF(IDataOutput)"/> method.
+    /// </para>
     /// </summary>
     public class DataOutputStream : IDataOutput, IDisposable
     {
@@ -238,6 +242,11 @@ namespace Lucene.Net.Support
             return utflen + 2;
         }
 
+        public int Length
+        {
+            get { return written; }
+        }
+
 
         #region From FilterOutputStream
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/dec66102/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index e750cca..3664713 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -477,6 +477,8 @@
     <Compile Include="core\Support\TestByteBuffer.cs" />
     <Compile Include="core\Support\TestLurchTable.cs" />
     <Compile Include="core\Support\TestLurchTableThreading.cs" />
+    <Compile Include="core\Support\TestDataInputStream.cs" />
+    <Compile Include="core\Support\TestDataOutputStream.cs" />
     <Compile Include="core\TestAssertions.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -676,6 +678,9 @@
   <ItemGroup>
     <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="core\Support\ReadFully.txt" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />
   <ProjectExtensions>
     <VisualStudio AllowExistingFolder="true" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/dec66102/src/Lucene.Net.Tests/core/Support/ReadFully.txt
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/ReadFully.txt b/src/Lucene.Net.Tests/core/Support/ReadFully.txt
new file mode 100644
index 0000000..ad76b7a
--- /dev/null
+++ b/src/Lucene.Net.Tests/core/Support/ReadFully.txt
@@ -0,0 +1,14 @@
+\ufeffLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna 
+aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
+Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur 
+sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna 
+aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
+Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur 
+sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna 
+aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
+Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur 
+sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/dec66102/src/Lucene.Net.Tests/core/Support/TestDataInputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/TestDataInputStream.cs b/src/Lucene.Net.Tests/core/Support/TestDataInputStream.cs
new file mode 100644
index 0000000..5c8463e
--- /dev/null
+++ b/src/Lucene.Net.Tests/core/Support/TestDataInputStream.cs
@@ -0,0 +1,224 @@
+\ufeffusing Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Support
+{
+    public class TestDataInputStream : LuceneTestCase
+    {
+        [Test]
+        public void TestReadFully()
+        {
+            const string READFULLY_TEST_FILE = "Lucene.Net.Tests.core.Support.ReadFully.txt";
+            byte[] buffer = new byte[1367];
+
+            Stream @in = GetType().Assembly.GetManifestResourceStream(READFULLY_TEST_FILE);
+            DataInputStream dis;
+            using (dis = new DataInputStream(@in))
+            { 
+                // Read once for real
+                dis.ReadFully(buffer, 0, 1366);
+            }
+
+            // Read past the end of the stream
+            @in = GetType().Assembly.GetManifestResourceStream(READFULLY_TEST_FILE);
+            dis = new DataInputStream(@in);
+            bool caughtException = false;
+            try
+            {
+                dis.ReadFully(buffer, 0, buffer.Length);
+            }
+#pragma warning disable 168
+            catch (EndOfStreamException ie)
+#pragma warning restore 168
+            {
+                caughtException = true;
+            }
+            finally
+            {
+                dis.Dispose();
+                if (!caughtException)
+                    fail("Test failed");
+            }
+
+            // Ensure we get an IndexOutOfRangeException exception when length is negative
+            @in = GetType().Assembly.GetManifestResourceStream(READFULLY_TEST_FILE);
+            dis = new DataInputStream(@in);
+            caughtException = false;
+            try
+            {
+                dis.ReadFully(buffer, 0, -20);
+            }
+#pragma warning disable 168
+            catch (IndexOutOfRangeException ie)
+#pragma warning restore 168
+            {
+                caughtException = true;
+            }
+            finally
+            {
+                dis.Dispose();
+                if (!caughtException)
+                    fail("Test failed");
+            }
+        }
+
+        [Test]
+        public void TestReadLinePushback()
+        {
+            using (MemoryStream pis = new MemoryStream("\r".GetBytes(Encoding.UTF8)))
+            {
+                DataInputStream dis = new DataInputStream(pis);
+
+#pragma warning disable 612, 618
+                string line = dis.ReadLine();
+#pragma warning restore 612, 618
+                if (line == null)
+                {
+                    fail("Got null, should return empty line");
+                }
+
+                long count = pis.Length - (line.Length + 1 /*account for the newline*/);
+
+                if (count != 0)
+                {
+                    fail("Test failed: available() returns "
+                                         + count + " when the file is empty");
+                }
+            }
+        }
+
+        [Test]
+        public void TestReadUTF()
+        {
+            for (int i = 0; i < TEST_ITERATIONS; i++)
+            {
+                try
+                {
+                    WriteAndReadAString();
+                }
+                catch (FormatException utfdfe)
+                {
+                    if (utfdfe.Message == null)
+                        fail("vague exception thrown");
+                }
+#pragma warning disable 168
+                catch (EndOfStreamException eofe)
+#pragma warning restore 168
+                {
+                    // These are rare and beyond the scope of the test
+                }
+            }
+        }
+
+
+        private static readonly int TEST_ITERATIONS = 1000;
+
+        private static readonly int A_NUMBER_NEAR_65535 = 60000;
+
+        private static readonly int MAX_CORRUPTIONS_PER_CYCLE = 3;
+
+        private static void WriteAndReadAString()
+        {
+            // Write out a string whose UTF-8 encoding is quite possibly
+            // longer than 65535 bytes
+            int length = Random().nextInt(A_NUMBER_NEAR_65535) + 1;
+            MemoryStream baos = new MemoryStream();
+            StringBuilder testBuffer = new StringBuilder();
+            for (int i = 0; i < length; i++)
+                testBuffer.append((char)Random().Next());
+            string testString = testBuffer.toString();
+            DataOutputStream dos = new DataOutputStream(baos);
+            dos.WriteUTF(testString);
+
+            // Corrupt the data to produce malformed characters
+            byte[] testBytes = baos.ToArray();
+            int dataLength = testBytes.Length;
+            int corruptions = Random().nextInt(MAX_CORRUPTIONS_PER_CYCLE);
+            for (int i = 0; i < corruptions; i++)
+            {
+                int index = Random().nextInt(dataLength);
+                testBytes[index] = (byte)Random().Next();
+            }
+
+            // Pay special attention to mangling the end to produce
+            // partial characters at end
+            testBytes[dataLength - 1] = (byte)Random().Next();
+            testBytes[dataLength - 2] = (byte)Random().Next();
+
+            // Attempt to decode the bytes back into a String
+            MemoryStream bais = new MemoryStream(testBytes);
+            DataInputStream dis = new DataInputStream(bais);
+            dis.ReadUTF();
+        }
+
+        [Test]
+        public void TestSkipBytes()
+        {
+            DataInputStream dis = new DataInputStream(new MyInputStream());
+            dotest(dis, 0, 11, -1, 0);
+            dotest(dis, 0, 11, 5, 5);
+            Console.WriteLine("\n***CAUTION**** - may go into an infinite loop");
+            dotest(dis, 5, 11, 20, 6);
+        }
+
+
+        private static void dotest(DataInputStream dis, int pos, int total,
+                               int toskip, int expected)
+        {
+
+            try
+            {
+                if (VERBOSE)
+                {
+                    Console.WriteLine("\n\nTotal bytes in the stream = " + total);
+                    Console.WriteLine("Currently at position = " + pos);
+                    Console.WriteLine("Bytes to skip = " + toskip);
+                    Console.WriteLine("Expected result = " + expected);
+                }
+                int skipped = dis.SkipBytes(toskip);
+                if (VERBOSE)
+                {
+                    Console.WriteLine("Actual skipped = " + skipped);
+                }
+                if (skipped != expected)
+                {
+                    fail("DataInputStream.skipBytes does not return expected value");
+                }
+            }
+            catch (EndOfStreamException e)
+            {
+                fail("DataInputStream.skipBytes throws unexpected EOFException");
+            }
+            catch (IOException e)
+            {
+                Console.WriteLine("IOException is thrown - possible result");
+            }
+        }
+
+        internal class MyInputStream : MemoryStream
+        {
+
+            private int readctr = 0;
+
+
+            public override int ReadByte()
+            {
+
+                if (readctr > 10)
+                {
+                    return -1;
+                }
+                else
+                {
+                    readctr++;
+                    return 0;
+                }
+
+            }
+
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/dec66102/src/Lucene.Net.Tests/core/Support/TestDataOutputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/TestDataOutputStream.cs b/src/Lucene.Net.Tests/core/Support/TestDataOutputStream.cs
new file mode 100644
index 0000000..11c1ce5
--- /dev/null
+++ b/src/Lucene.Net.Tests/core/Support/TestDataOutputStream.cs
@@ -0,0 +1,172 @@
+\ufeffusing Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Diagnostics;
+using System.IO;
+
+namespace Lucene.Net.Support
+{
+    public class TestDataOutputStream : LuceneTestCase
+    {
+        [Test]
+        public void TestCounterOverflow()
+        {
+            var output = new MemoryStream();
+            CounterOverflow dataOut = new CounterOverflow(output);
+
+            dataOut.WriteByte(1);
+            if (dataOut.Length < 0)
+            {
+                fail("Internal counter less than 0.");
+            }
+        }
+
+        private class CounterOverflow : DataOutputStream
+        {
+            public CounterOverflow(Stream output)
+                : base(output)
+            {
+                base.written = int.MaxValue;
+            }
+        }
+
+        [Test]
+        public void TestWriteUTF()
+        {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            DataOutputStream dos = new DataOutputStream(baos);
+            dos.WriteUTF("Hello, World!");  // 15
+            dos.Flush();
+            if (baos.Length != dos.Length)
+                fail("Miscounted bytes in DataOutputStream.");
+        }
+
+        [Test]
+        public void TestBoundsCheck()
+        {
+            byte[] data = { 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 };
+            ByteArrayOutputStream bos = new ByteArrayOutputStream();
+            DummyFilterStream dfs = new DummyFilterStream(bos);
+            bool caughtException = false;
+
+            // -ve length
+            try
+            {
+                dfs.Write(data, 0, -5);
+            }
+#pragma warning disable 168
+            catch (ArgumentOutOfRangeException ie)
+#pragma warning restore 168
+            {
+                caughtException = true;
+            }
+            finally
+            {
+                if (!caughtException)
+                    fail("Test failed");
+            }
+
+            // -ve offset
+            caughtException = false;
+            try
+            {
+                dfs.Write(data, -2, 5);
+            }
+#pragma warning disable 168
+            catch (ArgumentOutOfRangeException ie)
+#pragma warning restore 168
+            {
+                caughtException = true;
+            }
+            finally
+            {
+                if (!caughtException)
+                    fail("Test failed");
+            }
+
+            // off + len > data.length
+            caughtException = false;
+            try
+            {
+                dfs.Write(data, 6, 5);
+            }
+#pragma warning disable 168
+            catch (ArgumentException ie)
+#pragma warning restore 168
+            {
+                caughtException = true;
+            }
+            finally
+            {
+                if (!caughtException)
+                    fail("Test failed");
+            }
+
+            // null data
+            caughtException = false;
+            try
+            {
+                dfs.Write(null, 0, 5);
+            }
+#pragma warning disable 168
+            catch (ArgumentNullException re)
+#pragma warning restore 168
+            {
+                caughtException = true;
+            }
+            finally
+            {
+                if (!caughtException)
+                    fail("Test failed");
+            }
+        }
+
+        private class DummyFilterStream : DataOutputStream
+        {
+
+            public DummyFilterStream(Stream o)
+                    : base(o)
+            {
+            }
+
+            public override void Write(int val)
+            {
+                base.Write(val + 1);
+            }
+        }
+
+        [Test]
+        public void TestWrite()
+        {
+            IDataOutput f = new F(new Sink());
+            f.Write(new byte[] { 1, 2, 3 }, 0, 3);
+        }
+
+        private class F : DataOutputStream
+        {
+
+            public F(Stream o)
+                    : base(o)
+            {
+            }
+
+            public override void Write(int b)
+            {
+                Debug.WriteLine("Ignoring write of " + b);
+            }
+
+        }
+
+        private class Sink : MemoryStream
+        {
+
+            public override void WriteByte(byte b)
+            {
+                throw new Exception("DataOutputStream directly invoked"
+                                           + " Write(byte) method of underlying"
+                                           + " stream");
+            }
+
+        }
+    }
+}


[32/50] [abbrv] lucenenet git commit: Revert "HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context."

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
index 889f963..ace0574 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
@@ -35,506 +35,5 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
-
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
index 0bfd3d7..990e29c 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
@@ -36,68 +36,5 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
index 910584c..6f30a01 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
@@ -35,68 +35,5 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
index eb47d6c..ddb99c6 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
@@ -35,68 +35,5 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
index 7e094fd..cac7e77 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
@@ -35,68 +35,5 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
index 13afde6..e9beed4 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
@@ -35,68 +35,5 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
index 33895b1..4f65807 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
@@ -40,531 +40,5 @@ namespace Lucene.Net.Codecs.Memory
         {
             return false;
         }
-
-
-        #region BaseCompressingDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestUniqueValuesCompression()
-        {
-            base.TestUniqueValuesCompression();
-        }
-
-        [Test]
-        public override void TestDateCompression()
-        {
-            base.TestDateCompression();
-        }
-
-        [Test]
-        public override void TestSingleBigValueCompression()
-        {
-            base.TestSingleBigValueCompression();
-        }
-
-        #endregion
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
index 0f35370..938ae52 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
@@ -36,67 +36,5 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
index 19cd845..cd6f9f2 100644
--- a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
@@ -36,68 +36,5 @@ namespace Lucene.Net.Codecs.Pulsing
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
index d1c5f29..c374053 100644
--- a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
@@ -37,67 +37,5 @@ namespace Lucene.Net.Codecs.Sep
                 return codec;
             }
         }
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
index bdd6d82..497e26f 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
@@ -42,505 +42,5 @@ namespace Lucene.Net.Codecs.SimpleText
                 return codec;
             }
         }
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
index 96e6cb8..a8cb997 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
@@ -34,68 +34,5 @@ namespace Lucene.Net.Codecs.SimpleText
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
index 1d3ae31..5dab469 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
@@ -31,93 +31,5 @@ namespace Lucene.Net.Codecs.SimpleText
                 return new SimpleTextCodec();
             }
         }
-
-        #region BaseStoredFieldsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestRandomStoredFields()
-        {
-            base.TestRandomStoredFields();
-        }
-
-        [Test]
-        // LUCENE-1727: make sure doc fields are stored in order
-        public override void TestStoredFieldsOrder()
-        {
-            base.TestStoredFieldsOrder();
-        }
-
-        [Test]
-        // LUCENE-1219
-        public override void TestBinaryFieldOffsetLength()
-        {
-            base.TestBinaryFieldOffsetLength();
-        }
-
-        [Test]
-        public override void TestNumericField()
-        {
-            base.TestNumericField();
-        }
-
-        [Test]
-        public override void TestIndexedBit()
-        {
-            base.TestIndexedBit();
-        }
-
-        [Test]
-        public override void TestReadSkip()
-        {
-            base.TestReadSkip();
-        }
-
-        [Test, Timeout(300000)]
-        public override void TestEmptyDocs()
-        {
-            base.TestEmptyDocs();
-        }
-
-        [Test, Timeout(300000)]
-        public override void TestConcurrentReads()
-        {
-            base.TestConcurrentReads();
-        }
-
-        [Test]
-        public override void TestWriteReadMerge()
-        {
-            base.TestWriteReadMerge();
-        }
-
-        [Test, LongRunningTest]
-        public override void TestBigDocuments()
-        {
-            base.TestBigDocuments();
-        }
-
-        [Test]
-        public override void TestBulkMergeWithDeletes()
-        {
-            base.TestBulkMergeWithDeletes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
index 527deea..a5fe4c5 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
@@ -30,71 +30,5 @@ namespace Lucene.Net.Codecs.SimpleText
                 return new SimpleTextCodec();
             }
         }
-
-        #region BaseTermVectorsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        // only one doc with vectors
-        public override void TestRareVectors()
-        {
-            base.TestRareVectors();
-        }
-
-        [Test]
-        public override void TestHighFreqs()
-        {
-            base.TestHighFreqs();
-        }
-
-        [Test]
-        public override void TestLotsOfFields()
-        {
-            base.TestLotsOfFields();
-        }
-
-        [Test, Timeout(300000)]
-        // different options for the same field
-        public override void TestMixedOptions()
-        {
-            base.TestMixedOptions();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        [Test]
-        public override void TestMerge()
-        {
-            base.TestMerge();
-        }
-
-        [Test]
-        // run random tests from different threads to make sure the per-thread clones
-        // don't share mutable data
-        public override void TestClone()
-        {
-            base.TestClone();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
index fdc0e95..164f275 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
@@ -87,61 +87,5 @@ namespace Lucene.Net.Index.Sorter
             reader = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(dir));
             assertFalse("index should not have deletions", reader.HasDeletions);
         }
-
-
-        #region SorterTestBase
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestBinaryDocValuesField()
-        {
-            base.TestBinaryDocValuesField();
-        }
-
-        [Test]
-        public override void TestDocsAndPositionsEnum()
-        {
-            base.TestDocsAndPositionsEnum();
-        }
-
-        [Test]
-        public override void TestDocsEnum()
-        {
-            base.TestDocsEnum();
-        }
-
-        [Test]
-        public override void TestNormValues()
-        {
-            base.TestNormValues();
-        }
-
-        [Test]
-        public override void TestNumericDocValuesField()
-        {
-            base.TestNumericDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedDocValuesField()
-        {
-            base.TestSortedDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedSetDocValuesField()
-        {
-            base.TestSortedSetDocValuesField();
-        }
-
-        [Test]
-        public override void TestTermVectors()
-        {
-            base.TestTermVectors();
-        }
-
-        #endregion
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
index 99623ad..2cff135 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
@@ -230,7 +230,7 @@ namespace Lucene.Net.Index.Sorter
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBinaryDocValuesField()
         {
             BinaryDocValues dv = reader.GetBinaryDocValues(BINARY_DV_FIELD);
@@ -242,7 +242,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestDocsAndPositionsEnum()
         {
             TermsEnum termsEnum = reader.Terms(DOC_POSITIONS_FIELD).Iterator(null);
@@ -322,7 +322,7 @@ namespace Lucene.Net.Index.Sorter
             return bits;
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestDocsEnum()
         {
             Bits mappedLiveDocs = RandomLiveDocs(reader.MaxDoc);
@@ -369,7 +369,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestNormValues()
         {
             NumericDocValues dv = reader.GetNormValues(NORMS_FIELD);
@@ -380,7 +380,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestNumericDocValuesField()
         {
             NumericDocValues dv = reader.GetNumericDocValues(NUMERIC_DV_FIELD);
@@ -391,7 +391,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedDocValuesField()
         {
             SortedDocValues dv = reader.GetSortedDocValues(SORTED_DV_FIELD);
@@ -404,7 +404,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetDocValuesField()
         {
             AssumeTrue("default codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -423,7 +423,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTermVectors()
         {
             int maxDoc = reader.MaxDoc;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
index 93b234a..cb2b38e 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
@@ -79,61 +79,5 @@ namespace Lucene.Net.Index.Sorter
                 assertEquals("Cannot sort an index with a Sort that refers to the relevance score", e.Message);
             }
         }
-
-
-        #region SorterTestBase
-        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestBinaryDocValuesField()
-        {
-            base.TestBinaryDocValuesField();
-        }
-
-        [Test]
-        public override void TestDocsAndPositionsEnum()
-        {
-            base.TestDocsAndPositionsEnum();
-        }
-
-        [Test]
-        public override void TestDocsEnum()
-        {
-            base.TestDocsEnum();
-        }
-
-        [Test]
-        public override void TestNormValues()
-        {
-            base.TestNormValues();
-        }
-
-        [Test]
-        public override void TestNumericDocValuesField()
-        {
-            base.TestNumericDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedDocValuesField()
-        {
-            base.TestSortedDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedSetDocValuesField()
-        {
-            base.TestSortedSetDocValuesField();
-        }
-
-        [Test]
-        public override void TestTermVectors()
-        {
-            base.TestTermVectors();
-        }
-
-        #endregion
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
index 9dcfcde..37f00e2 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.Compressing
             return Arrays.CopyOfRange(bytes.Bytes, bytes.Offset, bytes.Offset + bytes.Length);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestDecompress()
         {
             int iterations = AtLeast(10);
@@ -103,7 +103,7 @@ namespace Lucene.Net.Codecs.Compressing
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestPartialDecompress()
         {
             int iterations = AtLeast(10);
@@ -139,19 +139,19 @@ namespace Lucene.Net.Codecs.Compressing
             return compressed;
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestEmptySequence()
         {
             Test(new byte[0]);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestShortSequence()
         {
             Test(new[] { (byte)Random().Next(256) });
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestIncompressible()
         {
             var decompressed = new byte[RandomInts.NextIntBetween(Random(), 20, 256)];
@@ -162,7 +162,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestConstant()
         {
             var decompressed = new byte[TestUtil.NextInt(Random(), 1, 10000)];
@@ -170,7 +170,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestLUCENE5201()
         {
             sbyte[] data = { 14, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 50, 64, 0, 46, -1, 0, 0, 0, 29, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 50, 64, 0, 47, -105, 0, 0, 0, 30, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, -97, 6, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68
 , -113, 0, 120, 64, 0, 48, 4, 0, 0, 0, 31, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 24, 32, 34, 124, 0, 120, 64, 0, 48, 80, 0, 0, 0, 31, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 
 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 7
 2, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 50, 64, 0, 49, 20, 0, 0, 0, 32, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 50, 64, 0, 50, 53, 0, 0, 0, 34, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0
 , 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 50, 64, 0, 51, 85, 0, 0, 0, 36, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, -97, 5, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 50, -64, 0, 51, -45, 0, 0, 0, 37, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -9
 7, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 120, 64, 0, 52, -88, 0, 0, 0, 39, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, -19, -24, -101, -35 };

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
index 334ae8d..feb57d0 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.Compressing
             return compressed;
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestShortLiteralsAndMatchs()
         {
             // literals and matchs lengths <= 15
@@ -96,7 +96,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestLongMatchs()
         {
             // match length >= 20
@@ -108,7 +108,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestLongLiterals()
         {
             // long literals (length >= 16) which are not the last literals
@@ -120,7 +120,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestMatchRightBeforeLastLiterals()
         {
             Test(new byte[] { 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5 });


[29/50] [abbrv] lucenenet git commit: Added longer timeouts to TestMultiMMap and TestControlledRealTimeReopenThread tests

Posted by ni...@apache.org.
Added longer timeouts to TestMultiMMap and TestControlledRealTimeReopenThread tests


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

Branch: refs/heads/master
Commit: d13c060b0597d063ce59df23453bc4b4a1cb503c
Parents: 3318a4d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Oct 19 10:16:41 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:59 2016 +0700

----------------------------------------------------------------------
 .../core/Search/TestControlledRealTimeReopenThread.cs            | 2 +-
 src/Lucene.Net.Tests/core/Store/TestMultiMMap.cs                 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d13c060b/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs b/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
index 5787ec8..be16827 100644
--- a/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
@@ -617,7 +617,7 @@ namespace Lucene.Net.Search
         }
 
         // LUCENE-5461
-        [Test]
+        [Test, Timeout(120000)]
         public virtual void TestCRTReopen()
         {
             //test behaving badly

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d13c060b/src/Lucene.Net.Tests/core/Store/TestMultiMMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestMultiMMap.cs b/src/Lucene.Net.Tests/core/Store/TestMultiMMap.cs
index 722a0d9..37bfc7c 100644
--- a/src/Lucene.Net.Tests/core/Store/TestMultiMMap.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestMultiMMap.cs
@@ -296,7 +296,7 @@ namespace Lucene.Net.Store
             }
         }
 
-        [Test]
+        [Test, Timeout(120000)]
         public virtual void TestSeeking()
         {
             for (int i = 0; i < 10; i++)
@@ -328,7 +328,7 @@ namespace Lucene.Net.Store
 
         // note instead of seeking to offset and reading length, this opens slices at the
         // the various offset+length and just does readBytes.
-        [Test]
+        [Test, Timeout(120000)]
         public virtual void TestSlicedSeeking()
         {
             for (int i = 0; i < 10; i++)


[37/50] [abbrv] lucenenet git commit: Completed implementation of QueryParser.Util.QueryParserTestBase.TestDateRange()

Posted by ni...@apache.org.
Completed implementation of QueryParser.Util.QueryParserTestBase.TestDateRange()


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

Branch: refs/heads/master
Commit: 77d1948be5540fcbddfe043b552cbd46d6e7315c
Parents: d3c07f6
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 23 15:59:12 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:46 2016 +0700

----------------------------------------------------------------------
 .../Classic/QueryParserBase.cs                  |  6 +-
 .../Classic/TestQueryParser.cs                  |  4 +-
 .../Util/QueryParserTestBase.cs                 | 79 ++++++++++----------
 3 files changed, 45 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/77d1948b/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs b/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs
index 83e13a2..ca10e89 100644
--- a/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs
+++ b/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs
@@ -457,7 +457,7 @@ namespace Lucene.Net.QueryParsers.Classic
                 DateTime d1, d2;
                 if (_useJavaStyleDateRangeParsing)
                 {
-                    // TODO: This doesn't emulate java perfectly.
+                    // LUCENENET TODO: This doesn't emulate java perfectly.
                     // Java allows parsing of the string up to the end of the pattern
                     // and then ignores everything else.  .NET will throw an exception, 
                     // so this will fail in those cases, though the code below is clear
@@ -478,11 +478,11 @@ namespace Lucene.Net.QueryParsers.Classic
                     // the time is set to the latest possible time of that date to really
                     // include all documents:
 
-                    // TODO: Try to work out if the Time Zone is pertinent here or
+                    // LUCENENET TODO: Try to work out if the Time Zone is pertinent here or
                     // whether it should just be removed from the API entirely.
                     // In Java:
                     // Calendar cal = Calendar.getInstance(timeZone, locale);
-
+                    
                     var cal = Locale.Calendar;
                     d2 = cal.AddHours(d2, 23);
                     d2 = cal.AddMinutes(d2, 59);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/77d1948b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
index d1fb5e6..2b71216 100644
--- a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
@@ -109,11 +109,11 @@ namespace Lucene.Net.QueryParsers.Classic
             qp.AutoGeneratePhraseQueries = value;
         }
 
-        public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, ICharSequence field, DateTools.Resolution value)
+        public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, string field, DateTools.Resolution value)
         {
             Debug.Assert(cqpC is QueryParser);
             QueryParser qp = (QueryParser)cqpC;
-            qp.SetDateResolution(field.toString(), value);
+            qp.SetDateResolution(field, value);
         }
 
         [Test]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/77d1948b/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs b/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
index e484902..698ba35 100644
--- a/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
@@ -11,6 +11,7 @@ using Lucene.Net.Util;
 using Lucene.Net.Util.Automaton;
 using NUnit.Framework;
 using System;
+using System.Globalization;
 
 namespace Lucene.Net.QueryParsers.Util
 {
@@ -117,7 +118,7 @@ namespace Lucene.Net.QueryParsers.Util
 
         public abstract void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value);
 
-        public abstract void SetDateResolution(ICommonQueryParserConfiguration cqpC, ICharSequence field, DateTools.Resolution value);
+        public abstract void SetDateResolution(ICommonQueryParserConfiguration cqpC, string field, DateTools.Resolution value);
 
         public abstract Query GetQuery(string query, ICommonQueryParserConfiguration cqpC);
 
@@ -661,9 +662,8 @@ namespace Lucene.Net.QueryParsers.Util
 
         private string GetLocalizedDate(int year, int month, int day)
         {
-            // TODO: Is this the right way to get the localized date?
             DateTime d = new DateTime(year, month, day, 23, 59, 59, 999);
-            return d.ToString();
+            return d.ToShortDateString();
 
             //// we use the default Locale/TZ since LuceneTestCase randomizes it
             //DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault());
@@ -677,45 +677,46 @@ namespace Lucene.Net.QueryParsers.Util
             //return df.format(calendar.getTime());
         }
 
-        // TODO: Fix this test
         [Test]
         public virtual void TestDateRange()
         {
-            Assert.Fail("Test is not implemented");
-
-        //    string startDate = GetLocalizedDate(2002, 1, 1);
-        //    string endDate = GetLocalizedDate(2002, 1, 4);
-        //    // we use the default Locale/TZ since LuceneTestCase randomizes it
-        //    Calendar endDateExpected = new GregorianCalendar(TimeZone.getDefault(), Locale.getDefault());
-        //    endDateExpected.clear();
-        //    endDateExpected.set(2002, 1, 4, 23, 59, 59);
-        //    endDateExpected.set(Calendar.MILLISECOND, 999);
-        //    string defaultField = "default";
-        //    string monthField = "month";
-        //    string hourField = "hour";
-        //    Analyzer a = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true);
-        //    CommonQueryParserConfiguration qp = GetParserConfig(a);
-
-        //    // set a field specific date resolution
-        //    SetDateResolution(qp, monthField, DateTools.Resolution.MONTH);
-
-        //    // set default date resolution to MILLISECOND
-        //    qp.SetDateResolution(DateTools.Resolution.MILLISECOND);
-
-        //    // set second field specific date resolution    
-        //    SetDateResolution(qp, hourField, DateTools.Resolution.HOUR);
-
-        //    // for this field no field specific date resolution has been set,
-        //    // so verify if the default resolution is used
-        //    AssertDateRangeQueryEquals(qp, defaultField, startDate, endDate,
-        //            endDateExpected.getTime(), DateTools.Resolution.MILLISECOND);
-
-        //    // verify if field specific date resolutions are used for these two fields
-        //    AssertDateRangeQueryEquals(qp, monthField, startDate, endDate,
-        //            endDateExpected.getTime(), DateTools.Resolution.MONTH);
-
-        //    AssertDateRangeQueryEquals(qp, hourField, startDate, endDate,
-        //            endDateExpected.getTime(), DateTools.Resolution.HOUR);
+            string startDate = GetLocalizedDate(2002, 1, 1);
+            string endDate = GetLocalizedDate(2002, 1, 4);
+
+            // we use the default Locale/TZ since LuceneTestCase randomizes it
+            //Calendar endDateExpected = new GregorianCalendar(TimeZone.getDefault(), Locale.getDefault());
+            //endDateExpected.clear();
+            //endDateExpected.set(2002, 1, 4, 23, 59, 59);
+            //endDateExpected.set(Calendar.MILLISECOND, 999);
+
+            // we use the default Locale/TZ since LuceneTestCase randomizes it
+            DateTime endDateExpected = new DateTime(2002, 1, 4, 23, 59, 59, 999, new GregorianCalendar());
+            string defaultField = "default";
+            string monthField = "month";
+            string hourField = "hour";
+            Analyzer a = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true);
+            ICommonQueryParserConfiguration qp = GetParserConfig(a);
+
+            // set a field specific date resolution
+            SetDateResolution(qp, monthField, DateTools.Resolution.MONTH);
+
+            // set default date resolution to MILLISECOND
+            qp.SetDateResolution(DateTools.Resolution.MILLISECOND);
+
+            // set second field specific date resolution    
+            SetDateResolution(qp, hourField, DateTools.Resolution.HOUR);
+
+            // for this field no field specific date resolution has been set,
+            // so verify if the default resolution is used
+            AssertDateRangeQueryEquals(qp, defaultField, startDate, endDate,
+                    endDateExpected /*.getTime()*/, DateTools.Resolution.MILLISECOND);
+
+            // verify if field specific date resolutions are used for these two fields
+            AssertDateRangeQueryEquals(qp, monthField, startDate, endDate,
+                    endDateExpected /*.getTime()*/, DateTools.Resolution.MONTH);
+
+            AssertDateRangeQueryEquals(qp, hourField, startDate, endDate,
+                    endDateExpected /*.getTime()*/, DateTools.Resolution.HOUR);
         }
 
         public void AssertDateRangeQueryEquals(ICommonQueryParserConfiguration cqpC, string field, string startDate, string endDate,


[39/50] [abbrv] lucenenet git commit: Fixed issues with tests polluting each other's state by setting FieldCache.InfoStream in the setup of the FieldCache specific tests and tearing them down properly rather than leaving the state around for other tests.

Posted by ni...@apache.org.
Fixed issues with tests polluting each other's state by setting FieldCache.InfoStream in the setup of the FieldCache specific tests and tearing them down properly rather than leaving the state around for other tests.


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

Branch: refs/heads/master
Commit: 4a8a6f18e9315439cf769a9ded7b6989683ccbee
Parents: 77d1948
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 23 16:54:47 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:47 2016 +0700

----------------------------------------------------------------------
 .../core/Search/TestFieldCache.cs               | 54 +++++++++++-----
 .../core/Search/TestFieldCacheRangeFilter.cs    | 64 ++++++++++++------
 src/Lucene.Net.Tests/core/Search/TestSort.cs    | 68 +++++++++++++-------
 .../core/Util/TestFieldCacheSanityChecker.cs    | 47 +++++++++-----
 4 files changed, 159 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a8a6f18/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
index 9c71e78..d45f364 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCache.cs
@@ -11,24 +11,23 @@ using System.Threading;
 
 namespace Lucene.Net.Search
 {
-
     /*
-    /// Copyright 2004 The Apache Software Foundation
-    /// 
-    /// Licensed under the Apache License, Version 2.0 (the "License");
-    /// you may not use this file except in compliance with the License.
-    /// You may obtain a copy of the License at
-    /// 
-    ///     http://www.apache.org/licenses/LICENSE-2.0
-    /// 
-    /// Unless required by applicable law or agreed to in writing, software
-    /// distributed under the License is distributed on an "AS IS" BASIS,
-    /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    /// See the License for the specific language governing permissions and
-    /// limitations under the License.
+    * Licensed to the Apache Software Foundation (ASF) under one or more
+    * contributor license agreements.  See the NOTICE file distributed with
+    * this work for additional information regarding copyright ownership.
+    * The ASF licenses this file to You under the Apache License, Version 2.0
+    * (the "License"); you may not use this file except in compliance with
+    * the License.  You may obtain a copy of the License at
+    *
+    *     http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
     */
 
-
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
     using BinaryDocValuesField = Lucene.Net.Documents.BinaryDocValuesField;
     using Document = Lucene.Net.Documents.Document;
@@ -76,6 +75,31 @@ namespace Lucene.Net.Search
         private static BytesRef[][] MultiValued;
         private static Directory Directory;
 
+        /// <summary>
+        /// LUCENENET specific. Ensure we have an infostream attached to the default FieldCache
+        /// when running the tests. In Java, this was done in the Core.Search.TestFieldCache.TestInfoStream() 
+        /// method (which polluted the state of these tests), but we need to make the tests self-contained 
+        /// so they can be run correctly regardless of order. Not setting the InfoStream skips an execution
+        /// path within these tests, so we should do it to make sure we test all of the code.
+        /// </summary>
+        public override void SetUp()
+        {
+            base.SetUp();
+            FieldCache.DEFAULT.InfoStream = new StringWriter();
+        }
+
+        /// <summary>
+        /// LUCENENET specific. See <see cref="SetUp()"/>. Dispose our InfoStream and set it to null
+        /// to avoid polluting the state of other tests.
+        /// </summary>
+        public override void TearDown()
+        {
+            FieldCache.DEFAULT.InfoStream.Dispose();
+            FieldCache.DEFAULT.InfoStream = null;
+            base.TearDown();
+        }
+
+
         // LUCENENET: Changed to non-static because NewIndexWriterConfig is non-static
         [TestFixtureSetUp]
         public void BeforeClass()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a8a6f18/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
index 1acffbd..cc0d022 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
@@ -1,30 +1,30 @@
-using System;
 using Lucene.Net.Documents;
+using NUnit.Framework;
+using System;
+using System.IO;
 
 namespace Lucene.Net.Search
 {
-    using NUnit.Framework;
+    /*
+    * Licensed to the Apache Software Foundation (ASF) under one or more
+    * contributor license agreements.  See the NOTICE file distributed with
+    * this work for additional information regarding copyright ownership.
+    * The ASF licenses this file to You under the Apache License, Version 2.0
+    * (the "License"); you may not use this file except in compliance with
+    * the License.  You may obtain a copy of the License at
+    *
+    *     http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    */
+
     using Directory = Lucene.Net.Store.Directory;
     using DirectoryReader = Lucene.Net.Index.DirectoryReader;
     using Document = Documents.Document;
-
-    /*
-         * Licensed to the Apache Software Foundation (ASF) under one or more
-         * contributor license agreements.  See the NOTICE file distributed with
-         * this work for additional information regarding copyright ownership.
-         * The ASF licenses this file to You under the Apache License, Version 2.0
-         * (the "License"); you may not use this file except in compliance with
-         * the License.  You may obtain a copy of the License at
-         *
-         *     http://www.apache.org/licenses/LICENSE-2.0
-         *
-         * Unless required by applicable law or agreed to in writing, software
-         * distributed under the License is distributed on an "AS IS" BASIS,
-         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-         * See the License for the specific language governing permissions and
-         * limitations under the License.
-         */
-
     using Field = Field;
     using IndexReader = Lucene.Net.Index.IndexReader;
     using IndexWriter = Lucene.Net.Index.IndexWriter;
@@ -43,6 +43,30 @@ namespace Lucene.Net.Search
     [TestFixture]
     public class TestFieldCacheRangeFilter : BaseTestRangeFilter
     {
+        /// <summary>
+        /// LUCENENET specific. Ensure we have an infostream attached to the default FieldCache
+        /// when running the tests. In Java, this was done in the Core.Search.TestFieldCache.TestInfoStream() 
+        /// method (which polluted the state of these tests), but we need to make the tests self-contained 
+        /// so they can be run correctly regardless of order. Not setting the InfoStream skips an execution
+        /// path within these tests, so we should do it to make sure we test all of the code.
+        /// </summary>
+        public override void SetUp()
+        {
+            base.SetUp();
+            FieldCache.DEFAULT.InfoStream = new StringWriter();
+        }
+
+        /// <summary>
+        /// LUCENENET specific. See <see cref="SetUp()"/>. Dispose our InfoStream and set it to null
+        /// to avoid polluting the state of other tests.
+        /// </summary>
+        public override void TearDown()
+        {
+            FieldCache.DEFAULT.InfoStream.Dispose();
+            FieldCache.DEFAULT.InfoStream = null;
+            base.TearDown();
+        }
+
         [Test]
         public virtual void TestRangeFilterId()
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a8a6f18/src/Lucene.Net.Tests/core/Search/TestSort.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSort.cs b/src/Lucene.Net.Tests/core/Search/TestSort.cs
index a7cdab0..0c32d54 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSort.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSort.cs
@@ -1,13 +1,31 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Randomized.Generators;
+using Lucene.Net.Support;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Text;
-using Lucene.Net.Documents;
 
 namespace Lucene.Net.Search
 {
-    using Lucene.Net.Randomized.Generators;
-    using Lucene.Net.Support;
-    using NUnit.Framework;
+    /*
+    * Licensed to the Apache Software Foundation (ASF) under one or more
+    * contributor license agreements.  See the NOTICE file distributed with
+    * this work for additional information regarding copyright ownership.
+    * The ASF licenses this file to You under the Apache License, Version 2.0
+    * (the "License"); you may not use this file except in compliance with
+    * the License.  You may obtain a copy of the License at
+    *
+    *     http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    */
+
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Directory = Lucene.Net.Store.Directory;
     using DirectoryReader = Lucene.Net.Index.DirectoryReader;
@@ -17,24 +35,6 @@ namespace Lucene.Net.Search
     using IndexWriter = Lucene.Net.Index.IndexWriter;
     using IndexWriterConfig = Lucene.Net.Index.IndexWriterConfig;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
-
-    /*
-         * Licensed to the Apache Software Foundation (ASF) under one or more
-         * contributor license agreements.  See the NOTICE file distributed with
-         * this work for additional information regarding copyright ownership.
-         * The ASF licenses this file to You under the Apache License, Version 2.0
-         * (the "License"); you may not use this file except in compliance with
-         * the License.  You may obtain a copy of the License at
-         *
-         *     http://www.apache.org/licenses/LICENSE-2.0
-         *
-         * Unless required by applicable law or agreed to in writing, software
-         * distributed under the License is distributed on an "AS IS" BASIS,
-         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-         * See the License for the specific language governing permissions and
-         * limitations under the License.
-         */
-
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
     using MultiReader = Lucene.Net.Index.MultiReader;
     using Occur = Lucene.Net.Search.BooleanClause.Occur;
@@ -64,6 +64,30 @@ namespace Lucene.Net.Search
     public class TestSort : LuceneTestCase
     {
         /// <summary>
+        /// LUCENENET specific. Ensure we have an infostream attached to the default FieldCache
+        /// when running the tests. In Java, this was done in the Core.Search.TestFieldCache.TestInfoStream() 
+        /// method (which polluted the state of these tests), but we need to make the tests self-contained 
+        /// so they can be run correctly regardless of order. Not setting the InfoStream skips an execution
+        /// path within these tests, so we should do it to make sure we test all of the code.
+        /// </summary>
+        public override void SetUp()
+        {
+            base.SetUp();
+            FieldCache.DEFAULT.InfoStream = new StringWriter();
+        }
+
+        /// <summary>
+        /// LUCENENET specific. See <see cref="SetUp()"/>. Dispose our InfoStream and set it to null
+        /// to avoid polluting the state of other tests.
+        /// </summary>
+        public override void TearDown()
+        {
+            FieldCache.DEFAULT.InfoStream.Dispose();
+            FieldCache.DEFAULT.InfoStream = null;
+            base.TearDown();
+        }
+
+        /// <summary>
         /// Tests sorting on type string </summary>
         [Test]
         public virtual void TestString()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a8a6f18/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs b/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs
index aaa7ff1..6a4a2e1 100644
--- a/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs
@@ -2,9 +2,27 @@ using Lucene.Net.Documents;
 using Lucene.Net.Search;
 using NUnit.Framework;
 using System;
+using System.IO;
 
 namespace Lucene.Net.Util
 {
+    /*
+    * Licensed to the Apache Software Foundation (ASF) under one or more
+    * contributor license agreements.  See the NOTICE file distributed with
+    * this work for additional information regarding copyright ownership.
+    * The ASF licenses this file to You under the Apache License, Version 2.0
+    * (the "License"); you may not use this file except in compliance with
+    * the License.  You may obtain a copy of the License at
+    *
+    *     http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    */
+
     using AtomicReader = Lucene.Net.Index.AtomicReader;
     using Directory = Lucene.Net.Store.Directory;
     using DirectoryReader = Lucene.Net.Index.DirectoryReader;
@@ -13,23 +31,6 @@ namespace Lucene.Net.Util
     using IndexWriter = Lucene.Net.Index.IndexWriter;
     using Insanity = Lucene.Net.Util.FieldCacheSanityChecker.Insanity;
     using InsanityType = Lucene.Net.Util.FieldCacheSanityChecker.InsanityType;
-
-    /*
-        /// Copyright 2009 The Apache Software Foundation
-        ///
-        /// Licensed under the Apache License, Version 2.0 (the "License");
-        /// you may not use this file except in compliance with the License.
-        /// You may obtain a copy of the License at
-        ///
-        ///     http://www.apache.org/licenses/LICENSE-2.0
-        ///
-        /// Unless required by applicable law or agreed to in writing, software
-        /// distributed under the License is distributed on an "AS IS" BASIS,
-        /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-        /// See the License for the specific language governing permissions and
-        /// limitations under the License.
-        */
-
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
     using MultiReader = Lucene.Net.Index.MultiReader;
     using SlowCompositeReaderWrapper = Lucene.Net.Index.SlowCompositeReaderWrapper;
@@ -87,6 +88,13 @@ namespace Lucene.Net.Util
             ReaderA = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(DirA));
             ReaderB = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(DirB));
             ReaderX = SlowCompositeReaderWrapper.Wrap(new MultiReader(ReaderA, ReaderB));
+
+            // LUCENENET specific.Ensure we have an infostream attached to the default FieldCache
+            // when running the tests. In Java, this was done in the Core.Search.TestFieldCache.TestInfoStream()
+            // method (which polluted the state of these tests), but we need to make the tests self-contained
+            // so they can be run correctly regardless of order. Not setting the InfoStream skips an execution
+            // path within these tests, so we should do it to make sure we test all of the code.
+            FieldCache.DEFAULT.InfoStream = new StringWriter();
         }
 
         [TearDown]
@@ -98,6 +106,11 @@ namespace Lucene.Net.Util
             ReaderX.Dispose();
             DirA.Dispose();
             DirB.Dispose();
+
+            // LUCENENET specific. See <see cref="SetUp()"/>. Dispose our InfoStream and set it to null
+            // to avoid polluting the state of other tests.
+            FieldCache.DEFAULT.InfoStream.Dispose();
+            FieldCache.DEFAULT.InfoStream = null;
             base.TearDown();
         }
 


[34/50] [abbrv] lucenenet git commit: Reworked QueryParserTestBase to once again be abstract. Added virtual keyword to tests to match that of Java. This is prep work for fixing test context in QueryParser.

Posted by ni...@apache.org.
Reworked QueryParserTestBase to once again be abstract. Added virtual keyword to tests to match that of Java. This is prep work for fixing test context in QueryParser.


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

Branch: refs/heads/master
Commit: d4d462e33a0f855eac69e28e13490408da1ca257
Parents: 6a2d485
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 23 05:30:45 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:36:45 2016 +0700

----------------------------------------------------------------------
 .../Analyzing/TestAnalyzingQueryParser.cs       |  22 +-
 .../Classic/TestMultiAnalyzer.cs                |   6 +-
 .../Classic/TestMultiFieldQueryParser.cs        |  20 +-
 .../Classic/TestMultiPhraseQueryParsing.cs      |   2 +-
 .../Classic/TestQueryParser.cs                  | 165 +++++++-------
 .../ComplexPhrase/TestComplexPhraseQuery.cs     |   8 +-
 .../Ext/TestExtendableQueryParser.cs            |   8 +-
 .../Ext/TestExtensions.cs                       |  13 +-
 .../Simple/TestSimpleQueryParser.cs             |  90 ++++----
 .../Surround/Query/Test01Exceptions.cs          |   2 +-
 .../Surround/Query/Test02Boolean.cs             |  46 ++--
 .../Surround/Query/Test03Distance.cs            |  90 ++++----
 .../Util/QueryParserTestBase.cs                 | 217 +++++--------------
 13 files changed, 283 insertions(+), 406 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Analyzing/TestAnalyzingQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Analyzing/TestAnalyzingQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Analyzing/TestAnalyzingQueryParser.cs
index 8424089..8ba3e12 100644
--- a/src/Lucene.Net.Tests.QueryParser/Analyzing/TestAnalyzingQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Analyzing/TestAnalyzingQueryParser.cs
@@ -92,7 +92,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestSingleChunkExceptions()
+        public virtual void TestSingleChunkExceptions()
         {
             bool ex = false;
             string termStr = "the*tre";
@@ -129,7 +129,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestWildcardAlone()
+        public virtual void TestWildcardAlone()
         {
             //seems like crazy edge case, but can be useful in concordance 
             bool pex = false;
@@ -158,7 +158,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestWildCardEscapes()
+        public virtual void TestWildCardEscapes()
         {
             foreach (var entry in wildcardEscapeHits)
             {
@@ -173,7 +173,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestWildCardQueryNoLeadingAllowed()
+        public virtual void TestWildCardQueryNoLeadingAllowed()
         {
             bool ex = false;
             try
@@ -190,7 +190,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestWildCardQuery()
+        public virtual void TestWildCardQuery()
         {
             for (int i = 0; i < wildcardInput.Length; i++)
             {
@@ -200,7 +200,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestPrefixQuery()
+        public virtual void TestPrefixQuery()
         {
             for (int i = 0; i < prefixInput.Length; i++)
             {
@@ -210,7 +210,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestRangeQuery()
+        public virtual void TestRangeQuery()
         {
             for (int i = 0; i < rangeInput.Length; i++)
             {
@@ -220,7 +220,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
         }
 
         [Test]
-        public void TestFuzzyQuery()
+        public virtual void TestFuzzyQuery()
         {
             for (int i = 0; i < fuzzyInput.Length; i++)
             {
@@ -296,7 +296,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
 
         // LUCENE-4176
         [Test]
-        public void TestByteTerms()
+        public virtual void TestByteTerms()
         {
             string s = "\u0e40\u0e02";
             Analyzer analyzer = new MockBytesAnalyzer();
@@ -310,9 +310,7 @@ namespace Lucene.Net.QueryParsers.Analyzing
             int hits;
             using (Directory ramDir = NewDirectory())
             {
-                // LUCENENET TODO: It seems the overload this test depends on has been removed from the RandomIndexWriter
-                //using (RandomIndexWriter writer = new RandomIndexWriter(Random(), ramDir, analyzer))
-                using (RandomIndexWriter writer = new RandomIndexWriter(Random(), ramDir, NewIndexWriterConfig(Random(), TEST_VERSION_CURRENT, analyzer)))
+                using (RandomIndexWriter writer = new RandomIndexWriter(Random(), ramDir, analyzer, Similarity, TimeZone))
                 {
                     Document doc = new Document();
                     FieldType fieldType = new FieldType();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiAnalyzer.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiAnalyzer.cs
index b98ba83..8e352d5 100644
--- a/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiAnalyzer.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiAnalyzer.cs
@@ -18,7 +18,7 @@ namespace Lucene.Net.QueryParsers.Classic
         private static int multiToken = 0;
 
         [Test]
-        public void TestMultiAnalyzer()
+        public virtual void TestMultiAnalyzer()
         {
 
             QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, "", new MultiAnalyzer());
@@ -75,7 +75,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestMultiAnalyzerWithSubclassOfQueryParser()
+        public virtual void TestMultiAnalyzerWithSubclassOfQueryParser()
         {
 
             DumbQueryParser qp = new DumbQueryParser("", new MultiAnalyzer());
@@ -96,7 +96,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestPosIncrementAnalyzer()
+        public virtual void TestPosIncrementAnalyzer()
         {
 #pragma warning disable 612, 618
             QueryParser qp = new QueryParser(LuceneVersion.LUCENE_40, "", new PosIncrementAnalyzer());

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiFieldQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiFieldQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiFieldQueryParser.cs
index 9e90937..94fd0a1 100644
--- a/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiFieldQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiFieldQueryParser.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// corresponding static form (qtxt, fields[]).
         /// </summary>
         [Test]
-        public void TestStopwordsParsing()
+        public virtual void TestStopwordsParsing()
         {
             AssertStopQueryEquals("one", "b:one t:one");
             AssertStopQueryEquals("one stop", "b:one t:one");
@@ -66,7 +66,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestSimple()
+        public virtual void TestSimple()
         {
             string[] fields = { "b", "t" };
             MultiFieldQueryParser mfqp = new MultiFieldQueryParser(TEST_VERSION_CURRENT, fields, new MockAnalyzer(Random()));
@@ -127,7 +127,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestBoostsSimple()
+        public virtual void TestBoostsSimple()
         {
             IDictionary<string, float> boosts = new Dictionary<string, float>();
             boosts["b"] = (float)5;
@@ -157,7 +157,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestStaticMethod1()
+        public virtual void TestStaticMethod1()
         {
             string[] fields = { "b", "t" };
             string[] queries = { "one", "two" };
@@ -200,7 +200,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestStaticMethod2()
+        public virtual void TestStaticMethod2()
         {
             string[] fields = { "b", "t" };
             BooleanClause.Occur[] flags = { BooleanClause.Occur.MUST, BooleanClause.Occur.MUST_NOT };
@@ -223,7 +223,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestStaticMethod2Old()
+        public virtual void TestStaticMethod2Old()
         {
             string[] fields = { "b", "t" };
             //int[] flags = {MultiFieldQueryParser.REQUIRED_FIELD, MultiFieldQueryParser.PROHIBITED_FIELD};
@@ -248,7 +248,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestStaticMethod3()
+        public virtual void TestStaticMethod3()
         {
             string[] queries = { "one", "two", "three" };
             string[] fields = { "f1", "f2", "f3" };
@@ -270,7 +270,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestStaticMethod3Old()
+        public virtual void TestStaticMethod3Old()
         {
             string[] queries = { "one", "two" };
             string[] fields = { "b", "t" };
@@ -307,7 +307,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestStopWordSearching()
+        public virtual void TestStopWordSearching()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
             using (var ramDir = NewDirectory())
@@ -362,7 +362,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestSimpleRegex()
+        public virtual void TestSimpleRegex()
         {
             string[] fields = new string[] { "a", "b" };
             MultiFieldQueryParser mfqp = new MultiFieldQueryParser(TEST_VERSION_CURRENT, fields, new MockAnalyzer(Random()));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiPhraseQueryParsing.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiPhraseQueryParsing.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiPhraseQueryParsing.cs
index e203ad1..8e4eae4 100644
--- a/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiPhraseQueryParsing.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestMultiPhraseQueryParsing.cs
@@ -95,7 +95,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestMultiPhraseQueryParsing()
+        public virtual void TestMultiPhraseQueryParsing()
         {
             TokenAndPos[] INCR_0_QUERY_TOKENS_AND = new TokenAndPos[]
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
index fd3f23e..d1fb5e6 100644
--- a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
@@ -50,81 +50,71 @@ namespace Lucene.Net.QueryParsers.Classic
 
         }
 
-        // Moved to QueryParserTestBase
-        //public QueryParser GetParser(Analyzer a)
-        //{
-        //    if (a == null) a = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true);
-        //    QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, DefaultField, a);
-        //    qp.DefaultOperator = (QueryParserBase.OR_OPERATOR);
-        //    return qp;
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override ICommonQueryParserConfiguration GetParserConfig(Analyzer a)
-        //{
-        //    return GetParser(a);
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override Query GetQuery(string query, ICommonQueryParserConfiguration cqpC)
-        //{
-        //    Debug.Assert(cqpC != null, "Parameter must not be null");
-        //    Debug.Assert(cqpC is QueryParser, "Parameter must be instance of QueryParser");
-        //    QueryParser qp = (QueryParser)cqpC;
-        //    return qp.Parse(query);
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override Query GetQuery(string query, Analyzer a)
-        //{
-        //    return GetParser(a).Parse(query);
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override bool IsQueryParserException(Exception exception)
-        //{
-        //    return exception is ParseException;
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override void SetDefaultOperatorOR(ICommonQueryParserConfiguration cqpC)
-        //{
-        //    Debug.Assert(cqpC is QueryParser);
-        //    QueryParser qp = (QueryParser)cqpC;
-        //    qp.DefaultOperator = QueryParserBase.Operator.OR;
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC)
-        //{
-        //    Debug.Assert(cqpC is QueryParser);
-        //    QueryParser qp = (QueryParser)cqpC;
-        //    qp.DefaultOperator = QueryParserBase.Operator.AND;
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value)
-        //{
-        //    Debug.Assert(cqpC is QueryParser);
-        //    QueryParser qp = (QueryParser)cqpC;
-        //    qp.AnalyzeRangeTerms = (value);
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value)
-        //{
-        //    Debug.Assert(cqpC is QueryParser);
-        //    QueryParser qp = (QueryParser)cqpC;
-        //    qp.AutoGeneratePhraseQueries = value;
-        //}
-
-        // Moved to QueryParserTestBase
-        //public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, ICharSequence field, DateTools.Resolution value)
-        //{
-        //    Debug.Assert(cqpC is QueryParser);
-        //    QueryParser qp = (QueryParser)cqpC;
-        //    qp.SetDateResolution(field.toString(), value);
-        //}
+        public virtual QueryParser GetParser(Analyzer a)
+        {
+            if (a == null) a = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true);
+            QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, DefaultField, a);
+            qp.DefaultOperator = (QueryParserBase.OR_OPERATOR);
+            return qp;
+        }
+
+        public override ICommonQueryParserConfiguration GetParserConfig(Analyzer a)
+        {
+            return GetParser(a);
+        }
+
+        public override Query GetQuery(string query, ICommonQueryParserConfiguration cqpC)
+        {
+            Debug.Assert(cqpC != null, "Parameter must not be null");
+            Debug.Assert(cqpC is QueryParser, "Parameter must be instance of QueryParser");
+            QueryParser qp = (QueryParser)cqpC;
+            return qp.Parse(query);
+        }
+
+        public override Query GetQuery(string query, Analyzer a)
+        {
+            return GetParser(a).Parse(query);
+        }
+
+        public override bool IsQueryParserException(Exception exception)
+        {
+            return exception is ParseException;
+        }
+
+        public override void SetDefaultOperatorOR(ICommonQueryParserConfiguration cqpC)
+        {
+            Debug.Assert(cqpC is QueryParser);
+            QueryParser qp = (QueryParser)cqpC;
+            qp.DefaultOperator = QueryParserBase.Operator.OR;
+        }
+
+        public override void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC)
+        {
+            Debug.Assert(cqpC is QueryParser);
+            QueryParser qp = (QueryParser)cqpC;
+            qp.DefaultOperator = QueryParserBase.Operator.AND;
+        }
+
+        public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value)
+        {
+            Debug.Assert(cqpC is QueryParser);
+            QueryParser qp = (QueryParser)cqpC;
+            qp.AnalyzeRangeTerms = (value);
+        }
+
+        public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value)
+        {
+            Debug.Assert(cqpC is QueryParser);
+            QueryParser qp = (QueryParser)cqpC;
+            qp.AutoGeneratePhraseQueries = value;
+        }
+
+        public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, ICharSequence field, DateTools.Resolution value)
+        {
+            Debug.Assert(cqpC is QueryParser);
+            QueryParser qp = (QueryParser)cqpC;
+            qp.SetDateResolution(field.toString(), value);
+        }
 
         [Test]
         public override void TestDefaultOperator()
@@ -149,7 +139,7 @@ namespace Lucene.Net.QueryParsers.Classic
         // This test is here as a safety, in case that ant step
         // doesn't work for some reason.
         [Test]
-        public void TestProtectedCtors()
+        public virtual void TestProtectedCtors()
         {
             try
             {
@@ -195,7 +185,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestFuzzySlopeExtendability()
+        public virtual void TestFuzzySlopeExtendability()
         {
             QueryParser qp = new TestFuzzySlopeExtendabilityQueryParser();
             assertEquals(qp.Parse("a:[11.95 TO 12.95]"), qp.Parse("12.45~1\u20ac"));
@@ -273,7 +263,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestCustomQueryParserWildcard()
+        public virtual void TestCustomQueryParserWildcard()
         {
             try
             {
@@ -288,7 +278,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestCustomQueryParserFuzzy()
+        public virtual void TestCustomQueryParserFuzzy()
         {
             try
             {
@@ -321,6 +311,7 @@ namespace Lucene.Net.QueryParsers.Classic
             }
         }
 
+        [Test]
         public override void TestNewFieldQuery()
         {
             /** ordinary behavior, synonyms form uncoordinated boolean query */
@@ -363,7 +354,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// simple synonyms test
         /// </summary>
         [Test]
-        public void TestSynonyms()
+        public virtual void TestSynonyms()
         {
             BooleanQuery expected = new BooleanQuery(true);
             expected.Add(new TermQuery(new Index.Term("field", "dogs")), BooleanClause.Occur.SHOULD);
@@ -383,7 +374,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// forms multiphrase query
         /// </summary>
         [Test]
-        public void TestSynonymsPhrase()
+        public virtual void TestSynonymsPhrase()
         {
             MultiPhraseQuery expected = new MultiPhraseQuery();
             expected.Add(new Index.Term("field", "old"));
@@ -450,7 +441,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// simple CJK synonym test
         /// </summary>
         [Test]
-        public void TestCJKSynonym()
+        public virtual void TestCJKSynonym()
         {
             BooleanQuery expected = new BooleanQuery(true);
             expected.Add(new TermQuery(new Index.Term("field", "\u56fd")), BooleanClause.Occur.SHOULD);
@@ -467,7 +458,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// synonyms with default OR operator 
         /// </summary>
         [Test]
-        public void TestCJKSynonymsOR()
+        public virtual void TestCJKSynonymsOR()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Index.Term("field", "\u4e2d")), BooleanClause.Occur.SHOULD);
@@ -485,7 +476,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// more complex synonyms with default OR operator
         /// </summary>
         [Test]
-        public void TestCJKSynonymsOR2()
+        public virtual void TestCJKSynonymsOR2()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Index.Term("field", "\u4e2d")), BooleanClause.Occur.SHOULD);
@@ -507,7 +498,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// synonyms with default AND operator
         /// </summary>
         [Test]
-        public void TestCJKSynonymsAND()
+        public virtual void TestCJKSynonymsAND()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Index.Term("field", "\u4e2d")), BooleanClause.Occur.MUST);
@@ -526,7 +517,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// more complex synonyms with default AND operator
         /// </summary>
         [Test]
-        public void TestCJKSynonymsAND2()
+        public virtual void TestCJKSynonymsAND2()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Index.Term("field", "\u4e2d")), BooleanClause.Occur.MUST);
@@ -546,7 +537,7 @@ namespace Lucene.Net.QueryParsers.Classic
         }
 
         [Test]
-        public void TestCJKSynonymsPhrase()
+        public virtual void TestCJKSynonymsPhrase()
         {
             MultiPhraseQuery expected = new MultiPhraseQuery();
             expected.Add(new Index.Term("field", "\u4e2d"));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/ComplexPhrase/TestComplexPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/ComplexPhrase/TestComplexPhraseQuery.cs b/src/Lucene.Net.Tests.QueryParser/ComplexPhrase/TestComplexPhraseQuery.cs
index e93e4a5..fcdb4dd 100644
--- a/src/Lucene.Net.Tests.QueryParser/ComplexPhrase/TestComplexPhraseQuery.cs
+++ b/src/Lucene.Net.Tests.QueryParser/ComplexPhrase/TestComplexPhraseQuery.cs
@@ -47,7 +47,7 @@ namespace Lucene.Net.QueryParsers.ComplexPhrase
         bool inOrder = true;
 
         [Test]
-        public void TestComplexPhrases()
+        public virtual void TestComplexPhrases()
         {
             CheckMatches("\"john smith\"", "1"); // Simple multi-term still works
             CheckMatches("\"j*   smyth~\"", "1,2"); // wildcards and fuzzies are OK in
@@ -72,7 +72,7 @@ namespace Lucene.Net.QueryParsers.ComplexPhrase
         }
 
         [Test]
-        public void TestUnOrderedProximitySearches()
+        public virtual void TestUnOrderedProximitySearches()
         {
             inOrder = true;
             CheckMatches("\"smith jo*\"~2", ""); // ordered proximity produces empty set
@@ -128,7 +128,7 @@ namespace Lucene.Net.QueryParsers.ComplexPhrase
         }
 
         [Test]
-        public void TestFieldedQuery()
+        public virtual void TestFieldedQuery()
         {
             CheckMatches("name:\"john smith\"", "1");
             CheckMatches("name:\"j*   smyth~\"", "1,2");
@@ -142,7 +142,7 @@ namespace Lucene.Net.QueryParsers.ComplexPhrase
         }
 
         [Test]
-        public void TestHashcodeEquals()
+        public virtual void TestHashcodeEquals()
         {
             ComplexPhraseQueryParser qp = new ComplexPhraseQueryParser(TEST_VERSION_CURRENT, defaultFieldName, analyzer);
             qp.InOrder = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
index 9ce7e01..e90b365 100644
--- a/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Ext/TestExtendableQueryParser.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestUnescapedExtDelimiter()
+        public virtual void TestUnescapedExtDelimiter()
         {
             Extensions ext = NewExtensions(':');
             ext.Add("testExt", new ExtensionStub());
@@ -65,7 +65,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestExtFieldUnqoted()
+        public virtual void TestExtFieldUnqoted()
         {
             for (int i = 0; i < DELIMITERS.Length; i++)
             {
@@ -100,7 +100,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestExtDefaultField()
+        public virtual void TestExtDefaultField()
         {
             for (int i = 0; i < DELIMITERS.Length; i++)
             {
@@ -124,7 +124,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestExtField()
+        public virtual void TestExtField()
         {
             for (int i = 0; i < DELIMITERS.Length; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Ext/TestExtensions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Ext/TestExtensions.cs b/src/Lucene.Net.Tests.QueryParser/Ext/TestExtensions.cs
index ffb6f07..c8a0d6c 100644
--- a/src/Lucene.Net.Tests.QueryParser/Ext/TestExtensions.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Ext/TestExtensions.cs
@@ -36,7 +36,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestBuildExtensionField()
+        public virtual void TestBuildExtensionField()
         {
             assertEquals("field\\:key", ext.BuildExtensionField("key", "field"));
             assertEquals("\\:key", ext.BuildExtensionField("key"));
@@ -47,7 +47,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestSplitExtensionField()
+        public virtual void TestSplitExtensionField()
         {
             assertEquals("field\\:key", ext.BuildExtensionField("key", "field"));
             assertEquals("\\:key", ext.BuildExtensionField("key"));
@@ -58,7 +58,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestAddGetExtension()
+        public virtual void TestAddGetExtension()
         {
             ParserExtension extension = new ExtensionStub();
             assertNull(ext.GetExtension("foo"));
@@ -69,7 +69,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestGetExtDelimiter()
+        public virtual void TestGetExtDelimiter()
         {
             assertEquals(Extensions.DEFAULT_EXTENSION_FIELD_DELIMITER, this.ext
                 .ExtensionFieldDelimiter);
@@ -78,7 +78,7 @@ namespace Lucene.Net.QueryParsers.Ext
         }
 
         [Test]
-        public void TestEscapeExtension()
+        public virtual void TestEscapeExtension()
         {
             assertEquals("abc\\:\\?\\{\\}\\[\\]\\\\\\(\\)\\+\\-\\!\\~", ext
                 .EscapeExtensionField("abc:?{}[]\\()+-!~"));
@@ -87,8 +87,7 @@ namespace Lucene.Net.QueryParsers.Ext
                 ext.EscapeExtensionField(null);
                 fail("should throw NPE - escape string is null");
             }
-            //catch (NullPointerException e)
-            catch (Exception /*e*/)
+            catch (NullReferenceException /*e*/)
             {
                 // 
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Simple/TestSimpleQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Simple/TestSimpleQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Simple/TestSimpleQueryParser.cs
index f05b467..1c8ccc6 100644
--- a/src/Lucene.Net.Tests.QueryParser/Simple/TestSimpleQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Simple/TestSimpleQueryParser.cs
@@ -64,7 +64,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test a simple term */
         [Test]
-        public void TestTerm()
+        public virtual void TestTerm()
         {
             Query expected = new TermQuery(new Term("field", "foobar"));
 
@@ -73,7 +73,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test a fuzzy query */
         [Test]
-        public void TestFuzzy()
+        public virtual void TestFuzzy()
         {
             Query regular = new TermQuery(new Term("field", "foobar"));
             Query expected = new FuzzyQuery(new Term("field", "foobar"), 2);
@@ -93,7 +93,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test a simple phrase */
         [Test]
-        public void TestPhrase()
+        public virtual void TestPhrase()
         {
             PhraseQuery expected = new PhraseQuery();
             expected.Add(new Term("field", "foo"));
@@ -104,7 +104,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test a simple phrase with various slop settings */
         [Test]
-        public void TestPhraseWithSlop()
+        public virtual void TestPhraseWithSlop()
         {
             PhraseQuery expectedWithSlop = new PhraseQuery();
             expectedWithSlop.Add(new Term("field", "foo"));
@@ -143,7 +143,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test a simple prefix */
         [Test]
-        public void TestPrefix()
+        public virtual void TestPrefix()
         {
             PrefixQuery expected = new PrefixQuery(new Term("field", "foobar"));
 
@@ -152,7 +152,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test some AND'd terms using '+' operator */
         [Test]
-        public void TestAND()
+        public virtual void TestAND()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "foo")), BooleanClause.Occur.MUST);
@@ -163,7 +163,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test some AND'd phrases using '+' operator */
         [Test]
-        public void TestANDPhrase()
+        public virtual void TestANDPhrase()
         {
             PhraseQuery phrase1 = new PhraseQuery();
             phrase1.Add(new Term("field", "foo"));
@@ -180,7 +180,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test some AND'd terms (just using whitespace) */
         [Test]
-        public void TestANDImplicit()
+        public virtual void TestANDImplicit()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "foo")), BooleanClause.Occur.MUST);
@@ -191,7 +191,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test some OR'd terms */
         [Test]
-        public void TestOR()
+        public virtual void TestOR()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "foo")), BooleanClause.Occur.SHOULD);
@@ -203,7 +203,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test some OR'd terms (just using whitespace) */
         [Test]
-        public void TestORImplicit()
+        public virtual void TestORImplicit()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "foo")), BooleanClause.Occur.SHOULD);
@@ -215,7 +215,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test some OR'd phrases using '|' operator */
         [Test]
-        public void TestORPhrase()
+        public virtual void TestORPhrase()
         {
             PhraseQuery phrase1 = new PhraseQuery();
             phrase1.Add(new Term("field", "foo"));
@@ -232,7 +232,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test negated term */
         [Test]
-        public void TestNOT()
+        public virtual void TestNOT()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "foo")), BooleanClause.Occur.MUST_NOT);
@@ -245,7 +245,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test crazy prefixes with multiple asterisks */
         [Test]
-        public void TestCrazyPrefixes1()
+        public virtual void TestCrazyPrefixes1()
         {
             Query expected = new PrefixQuery(new Term("field", "st*ar"));
 
@@ -254,7 +254,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test prefixes with some escaping */
         [Test]
-        public void TestCrazyPrefixes2()
+        public virtual void TestCrazyPrefixes2()
         {
             Query expected = new PrefixQuery(new Term("field", "st*ar\\*"));
 
@@ -263,7 +263,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** not a prefix query! the prefix operator is escaped */
         [Test]
-        public void TestTermInDisguise()
+        public virtual void TestTermInDisguise()
         {
             Query expected = new TermQuery(new Term("field", "st*ar\\*"));
 
@@ -276,7 +276,7 @@ namespace Lucene.Net.QueryParsers.Simple
         // input was trying to be
 
         [Test]
-        public void TestGarbageTerm()
+        public virtual void TestGarbageTerm()
         {
             Query expected = new TermQuery(new Term("field", "star"));
 
@@ -292,7 +292,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestGarbageEmpty()
+        public virtual void TestGarbageEmpty()
         {
             assertNull(Parse(""));
             assertNull(Parse("  "));
@@ -308,7 +308,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestGarbageAND()
+        public virtual void TestGarbageAND()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "star")), BooleanClause.Occur.MUST);
@@ -323,7 +323,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestGarbageOR()
+        public virtual void TestGarbageOR()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "star")), BooleanClause.Occur.SHOULD);
@@ -336,7 +336,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestGarbageNOT()
+        public virtual void TestGarbageNOT()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "star")), BooleanClause.Occur.MUST_NOT);
@@ -348,7 +348,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestGarbagePhrase()
+        public virtual void TestGarbagePhrase()
         {
             PhraseQuery expected = new PhraseQuery();
             expected.Add(new Term("field", "star"));
@@ -361,7 +361,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestGarbageSubquery()
+        public virtual void TestGarbageSubquery()
         {
             Query expected = new TermQuery(new Term("field", "star"));
 
@@ -373,7 +373,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestCompoundAnd()
+        public virtual void TestCompoundAnd()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "star")), BooleanClause.Occur.MUST);
@@ -386,7 +386,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestCompoundOr()
+        public virtual void TestCompoundOr()
         {
             BooleanQuery expected = new BooleanQuery();
             expected.Add(new TermQuery(new Term("field", "star")), BooleanClause.Occur.SHOULD);
@@ -399,7 +399,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestComplex00()
+        public virtual void TestComplex00()
         {
             BooleanQuery expected = new BooleanQuery();
             BooleanQuery inner = new BooleanQuery();
@@ -414,7 +414,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestComplex01()
+        public virtual void TestComplex01()
         {
             BooleanQuery expected = new BooleanQuery();
             BooleanQuery inner = new BooleanQuery();
@@ -429,7 +429,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestComplex02()
+        public virtual void TestComplex02()
         {
             BooleanQuery expected = new BooleanQuery();
             BooleanQuery inner = new BooleanQuery();
@@ -445,7 +445,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestComplex03()
+        public virtual void TestComplex03()
         {
             BooleanQuery expected = new BooleanQuery();
             BooleanQuery inner = new BooleanQuery();
@@ -464,7 +464,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestComplex04()
+        public virtual void TestComplex04()
         {
             BooleanQuery expected = new BooleanQuery();
             BooleanQuery inner = new BooleanQuery();
@@ -483,7 +483,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestComplex05()
+        public virtual void TestComplex05()
         {
             BooleanQuery expected = new BooleanQuery();
             BooleanQuery inner1 = new BooleanQuery();
@@ -513,7 +513,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestComplex06()
+        public virtual void TestComplex06()
         {
             BooleanQuery expected = new BooleanQuery();
             BooleanQuery inner1 = new BooleanQuery();
@@ -539,7 +539,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test a term with field weights */
         [Test]
-        public void TestWeightedTerm()
+        public virtual void TestWeightedTerm()
         {
             IDictionary<string, float> weights = new Dictionary<string, float>();
             weights["field0"] = 5f;
@@ -560,7 +560,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test a more complex query with field weights */
         [Test]
-        public void testWeightedOR()
+        public virtual void testWeightedOR()
         {
             IDictionary<string, float> weights = new Dictionary<string, float>();
             weights["field0"] = 5f;
@@ -602,7 +602,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test the ability to enable/disable phrase operator */
         [Test]
-        public void TestDisablePhrase()
+        public virtual void TestDisablePhrase()
         {
             Query expected = new TermQuery(new Term("field", "\"test\""));
             assertEquals(expected, ParseKeyword("\"test\"", ~SimpleQueryParser.PHRASE_OPERATOR));
@@ -610,7 +610,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test the ability to enable/disable prefix operator */
         [Test]
-        public void TestDisablePrefix()
+        public virtual void TestDisablePrefix()
         {
             Query expected = new TermQuery(new Term("field", "test*"));
             assertEquals(expected, ParseKeyword("test*", ~SimpleQueryParser.PREFIX_OPERATOR));
@@ -618,7 +618,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test the ability to enable/disable AND operator */
         [Test]
-        public void TestDisableAND()
+        public virtual void TestDisableAND()
         {
             Query expected = new TermQuery(new Term("field", "foo+bar"));
             assertEquals(expected, ParseKeyword("foo+bar", ~SimpleQueryParser.AND_OPERATOR));
@@ -628,7 +628,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test the ability to enable/disable OR operator */
         [Test]
-        public void TestDisableOR()
+        public virtual void TestDisableOR()
         {
             Query expected = new TermQuery(new Term("field", "foo|bar"));
             assertEquals(expected, ParseKeyword("foo|bar", ~SimpleQueryParser.OR_OPERATOR));
@@ -638,7 +638,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test the ability to enable/disable NOT operator */
         [Test]
-        public void TestDisableNOT()
+        public virtual void TestDisableNOT()
         {
             Query expected = new TermQuery(new Term("field", "-foo"));
             assertEquals(expected, ParseKeyword("-foo", ~SimpleQueryParser.NOT_OPERATOR));
@@ -646,7 +646,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test the ability to enable/disable precedence operators */
         [Test]
-        public void TestDisablePrecedence()
+        public virtual void TestDisablePrecedence()
         {
             Query expected = new TermQuery(new Term("field", "(foo)"));
             assertEquals(expected, ParseKeyword("(foo)", ~SimpleQueryParser.PRECEDENCE_OPERATORS));
@@ -656,7 +656,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         /** test the ability to enable/disable escape operators */
         [Test]
-        public void TestDisableEscape()
+        public virtual void TestDisableEscape()
         {
             Query expected = new TermQuery(new Term("field", "foo\\bar"));
             assertEquals(expected, ParseKeyword("foo\\bar", ~SimpleQueryParser.ESCAPE_OPERATOR));
@@ -665,7 +665,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestDisableWhitespace()
+        public virtual void TestDisableWhitespace()
         {
             Query expected = new TermQuery(new Term("field", "foo foo"));
             assertEquals(expected, ParseKeyword("foo foo", ~SimpleQueryParser.WHITESPACE_OPERATOR));
@@ -676,14 +676,14 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void TestDisableFuzziness()
+        public virtual void TestDisableFuzziness()
         {
             Query expected = new TermQuery(new Term("field", "foo~1"));
             assertEquals(expected, ParseKeyword("foo~1", ~SimpleQueryParser.FUZZY_OPERATOR));
         }
 
         [Test]
-        public void TestDisableSlop()
+        public virtual void TestDisableSlop()
         {
             PhraseQuery expectedPhrase = new PhraseQuery();
             expectedPhrase.Add(new Term("field", "foo"));
@@ -697,7 +697,7 @@ namespace Lucene.Net.QueryParsers.Simple
 
         // we aren't supposed to barf on any input...
         [Test]
-        public void TestRandomQueries()
+        public virtual void TestRandomQueries()
         {
             for (int i = 0; i < 1000; i++)
             {
@@ -708,7 +708,7 @@ namespace Lucene.Net.QueryParsers.Simple
         }
 
         [Test]
-        public void testRandomQueries2()
+        public virtual void testRandomQueries2()
         {
             char[] chars = new char[] { 'a', '1', '|', '&', ' ', '(', ')', '"', '-', '~' };
             StringBuilder sb = new StringBuilder();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test01Exceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test01Exceptions.cs b/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test01Exceptions.cs
index 14b38c0..09940cc 100644
--- a/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test01Exceptions.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test01Exceptions.cs
@@ -60,7 +60,7 @@ namespace Lucene.Net.QueryParsers.Surround.Query
         };
 
         [Test]
-        public void Test01Exceptions()
+        public virtual void Test01Exceptions()
         {
             string m = ExceptionQueryTst.GetFailQueries(exceptionQueries, verbose);
             if (m.Length > 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test02Boolean.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test02Boolean.cs b/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test02Boolean.cs
index c0e5407..7dd6c62 100644
--- a/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test02Boolean.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test02Boolean.cs
@@ -58,119 +58,119 @@ namespace Lucene.Net.QueryParsers.Surround.Query
         }
 
         [Test]
-        public void Test02Terms01()
+        public virtual void Test02Terms01()
         {
             int[] expdnrs = { 0 }; NormalTest1("word1", expdnrs);
         }
         [Test]
-        public void Test02Terms02()
+        public virtual void Test02Terms02()
         {
             int[] expdnrs = { 0, 1, 3 }; NormalTest1("word*", expdnrs);
         }
         [Test]
-        public void Test02Terms03()
+        public virtual void Test02Terms03()
         {
             int[] expdnrs = { 2 }; NormalTest1("ord2", expdnrs);
         }
         [Test]
-        public void Test02Terms04()
+        public virtual void Test02Terms04()
         {
             int[] expdnrs = { }; NormalTest1("kxork*", expdnrs);
         }
         [Test]
-        public void Test02Terms05()
+        public virtual void Test02Terms05()
         {
             int[] expdnrs = { 0, 1, 3 }; NormalTest1("wor*", expdnrs);
         }
         [Test]
-        public void Test02Terms06()
+        public virtual void Test02Terms06()
         {
             int[] expdnrs = { }; NormalTest1("ab", expdnrs);
         }
 
         [Test]
-        public void Test02Terms10()
+        public virtual void Test02Terms10()
         {
             int[] expdnrs = { }; NormalTest1("abc?", expdnrs);
         }
         [Test]
-        public void Test02Terms13()
+        public virtual void Test02Terms13()
         {
             int[] expdnrs = { 0, 1, 3 }; NormalTest1("word?", expdnrs);
         }
         [Test]
-        public void Test02Terms14()
+        public virtual void Test02Terms14()
         {
             int[] expdnrs = { 0, 1, 3 }; NormalTest1("w?rd?", expdnrs);
         }
         [Test]
-        public void Test02Terms20()
+        public virtual void Test02Terms20()
         {
             int[] expdnrs = { 0, 1, 3 }; NormalTest1("w*rd?", expdnrs);
         }
         [Test]
-        public void Test02Terms21()
+        public virtual void Test02Terms21()
         {
             int[] expdnrs = { 3 }; NormalTest1("w*rd??", expdnrs);
         }
         [Test]
-        public void Test02Terms22()
+        public virtual void Test02Terms22()
         {
             int[] expdnrs = { 3 }; NormalTest1("w*?da?", expdnrs);
         }
         [Test]
-        public void Test02Terms23()
+        public virtual void Test02Terms23()
         {
             int[] expdnrs = { }; NormalTest1("w?da?", expdnrs);
         }
 
         [Test]
-        public void Test03And01()
+        public virtual void Test03And01()
         {
             int[] expdnrs = { 0 }; NormalTest1("word1 AND word2", expdnrs);
         }
         [Test]
-        public void Test03And02()
+        public virtual void Test03And02()
         {
             int[] expdnrs = { 3 }; NormalTest1("word* and ord*", expdnrs);
         }
         [Test]
-        public void Test03And03()
+        public virtual void Test03And03()
         {
             int[] expdnrs = { 0 }; NormalTest1("and(word1,word2)", expdnrs);
         }
         [Test]
-        public void Test04Or01()
+        public virtual void Test04Or01()
         {
             int[] expdnrs = { 0, 3 }; NormalTest1("word1 or word2", expdnrs);
         }
         [Test]
-        public void Test04Or02()
+        public virtual void Test04Or02()
         {
             int[] expdnrs = { 0, 1, 2, 3 }; NormalTest1("word* OR ord*", expdnrs);
         }
         [Test]
-        public void Test04Or03()
+        public virtual void Test04Or03()
         {
             int[] expdnrs = { 0, 3 }; NormalTest1("OR (word1, word2)", expdnrs);
         }
         [Test]
-        public void Test05Not01()
+        public virtual void Test05Not01()
         {
             int[] expdnrs = { 3 }; NormalTest1("word2 NOT word1", expdnrs);
         }
         [Test]
-        public void Test05Not02()
+        public virtual void Test05Not02()
         {
             int[] expdnrs = { 0 }; NormalTest1("word2* not ord*", expdnrs);
         }
         [Test]
-        public void Test06AndOr01()
+        public virtual void Test06AndOr01()
         {
             int[] expdnrs = { 0 }; NormalTest1("(word1 or ab)and or(word2,xyz, defg)", expdnrs);
         }
         [Test]
-        public void Test07AndOrNot02()
+        public virtual void Test07AndOrNot02()
         {
             int[] expdnrs = { 0 }; NormalTest1("or( word2* not ord*, and(xyz,def))", expdnrs);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test03Distance.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test03Distance.cs b/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test03Distance.cs
index 12a4e76..1504537 100644
--- a/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test03Distance.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Surround/Query/Test03Distance.cs
@@ -44,7 +44,7 @@ namespace Lucene.Net.QueryParsers.Surround.Query
         };
 
         [Test]
-        public void Test00Exceptions()
+        public virtual void Test00Exceptions()
         {
             string m = ExceptionQueryTst.GetFailQueries(exceptionQueries, verbose);
             if (m.Length > 0)
@@ -81,167 +81,167 @@ namespace Lucene.Net.QueryParsers.Surround.Query
             bqt.DoTest();
         }
 
-        public void DistanceTest1(string query, int[] expdnrs)
+        public virtual void DistanceTest1(string query, int[] expdnrs)
         {
             DistanceTst(query, expdnrs, db1);
         }
 
         [Test]
-        public void Test0W01()
+        public virtual void Test0W01()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word1 w word2", expdnrs);
         }
         [Test]
-        public void Test0N01()
+        public virtual void Test0N01()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word1 n word2", expdnrs);
         }
         [Test]
-        public void Test0N01r()
+        public virtual void Test0N01r()
         { /* r reverse */
             int[] expdnrs = { 0 }; DistanceTest1("word2 n word1", expdnrs);
         }
         [Test]
-        public void Test0W02()
+        public virtual void Test0W02()
         {
             int[] expdnrs = { }; DistanceTest1("word2 w word1", expdnrs);
         }
         [Test]
-        public void Test0W03()
+        public virtual void Test0W03()
         {
             int[] expdnrs = { }; DistanceTest1("word2 2W word1", expdnrs);
         }
         [Test]
-        public void Test0N03()
+        public virtual void Test0N03()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word2 2N word1", expdnrs);
         }
         [Test]
-        public void Test0N03r()
+        public virtual void Test0N03r()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word1 2N word2", expdnrs);
         }
 
         [Test]
-        public void Test0W04()
+        public virtual void Test0W04()
         {
             int[] expdnrs = { }; DistanceTest1("word2 3w word1", expdnrs);
         }
 
         [Test]
-        public void Test0N04()
+        public virtual void Test0N04()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word2 3n word1", expdnrs);
         }
         [Test]
-        public void Test0N04r()
+        public virtual void Test0N04r()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word1 3n word2", expdnrs);
         }
 
         [Test]
-        public void Test0W05()
+        public virtual void Test0W05()
         {
             int[] expdnrs = { }; DistanceTest1("orda1 w orda3", expdnrs);
         }
         [Test]
-        public void Test0W06()
+        public virtual void Test0W06()
         {
             int[] expdnrs = { 3 }; DistanceTest1("orda1 2w orda3", expdnrs);
         }
 
         [Test]
-        public void Test1Wtrunc01()
+        public virtual void Test1Wtrunc01()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word1* w word2", expdnrs);
         }
         [Test]
-        public void Test1Wtrunc02()
+        public virtual void Test1Wtrunc02()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word* w word2", expdnrs);
         }
         [Test]
-        public void Test1Wtrunc02r()
+        public virtual void Test1Wtrunc02r()
         {
             int[] expdnrs = { 0, 3 }; DistanceTest1("word2 w word*", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc02()
+        public virtual void Test1Ntrunc02()
         {
             int[] expdnrs = { 0, 3 }; DistanceTest1("word* n word2", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc02r()
+        public virtual void Test1Ntrunc02r()
         {
             int[] expdnrs = { 0, 3 }; DistanceTest1("word2 n word*", expdnrs);
         }
 
         [Test]
-        public void Test1Wtrunc03()
+        public virtual void Test1Wtrunc03()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word1* w word2*", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc03()
+        public virtual void Test1Ntrunc03()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word1* N word2*", expdnrs);
         }
 
         [Test]
-        public void Test1Wtrunc04()
+        public virtual void Test1Wtrunc04()
         {
             int[] expdnrs = { }; DistanceTest1("kxork* w kxor*", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc04()
+        public virtual void Test1Ntrunc04()
         {
             int[] expdnrs = { }; DistanceTest1("kxork* 99n kxor*", expdnrs);
         }
 
         [Test]
-        public void Test1Wtrunc05()
+        public virtual void Test1Wtrunc05()
         {
             int[] expdnrs = { }; DistanceTest1("word2* 2W word1*", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc05()
+        public virtual void Test1Ntrunc05()
         {
             int[] expdnrs = { 0 }; DistanceTest1("word2* 2N word1*", expdnrs);
         }
 
         [Test]
-        public void Test1Wtrunc06()
+        public virtual void Test1Wtrunc06()
         {
             int[] expdnrs = { 3 }; DistanceTest1("ord* W word*", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc06()
+        public virtual void Test1Ntrunc06()
         {
             int[] expdnrs = { 3 }; DistanceTest1("ord* N word*", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc06r()
+        public virtual void Test1Ntrunc06r()
         {
             int[] expdnrs = { 3 }; DistanceTest1("word* N ord*", expdnrs);
         }
 
         [Test]
-        public void Test1Wtrunc07()
+        public virtual void Test1Wtrunc07()
         {
             int[] expdnrs = { 3 }; DistanceTest1("(orda2 OR orda3) W word*", expdnrs);
         }
         [Test]
-        public void Test1Wtrunc08()
+        public virtual void Test1Wtrunc08()
         {
             int[] expdnrs = { 3 }; DistanceTest1("(orda2 OR orda3) W (word2 OR worda3)", expdnrs);
         }
         [Test]
-        public void Test1Wtrunc09()
+        public virtual void Test1Wtrunc09()
         {
             int[] expdnrs = { 3 }; DistanceTest1("(orda2 OR orda3) 2W (word2 OR worda3)", expdnrs);
         }
         [Test]
-        public void Test1Ntrunc09()
+        public virtual void Test1Ntrunc09()
         {
             int[] expdnrs = { 3 }; DistanceTest1("(orda2 OR orda3) 2N (word2 OR worda3)", expdnrs);
         }
@@ -254,62 +254,62 @@ namespace Lucene.Net.QueryParsers.Surround.Query
 
         SingleFieldTestDb db2;
 
-        public void DistanceTest2(string query, int[] expdnrs)
+        public virtual void DistanceTest2(string query, int[] expdnrs)
         {
             DistanceTst(query, expdnrs, db2);
         }
 
         [Test]
-        public void Test2Wprefix01()
+        public virtual void Test2Wprefix01()
         {
             int[] expdnrs = { 0 }; DistanceTest2("W (w1, w2, w3)", expdnrs);
         }
         [Test]
-        public void Test2Nprefix01a()
+        public virtual void Test2Nprefix01a()
         {
             int[] expdnrs = { 0, 1 }; DistanceTest2("N(w1, w2, w3)", expdnrs);
         }
         [Test]
-        public void Test2Nprefix01b()
+        public virtual void Test2Nprefix01b()
         {
             int[] expdnrs = { 0, 1 }; DistanceTest2("N(w3, w1, w2)", expdnrs);
         }
 
         [Test]
-        public void Test2Wprefix02()
+        public virtual void Test2Wprefix02()
         {
             int[] expdnrs = { 0, 1 }; DistanceTest2("2W(w1,w2,w3)", expdnrs);
         }
 
         [Test]
-        public void Test2Nprefix02a()
+        public virtual void Test2Nprefix02a()
         {
             int[] expdnrs = { 0, 1 }; DistanceTest2("2N(w1,w2,w3)", expdnrs);
         }
         [Test]
-        public void Test2Nprefix02b()
+        public virtual void Test2Nprefix02b()
         {
             int[] expdnrs = { 0, 1 }; DistanceTest2("2N(w2,w3,w1)", expdnrs);
         }
 
         [Test]
-        public void Test2Wnested01()
+        public virtual void Test2Wnested01()
         {
             int[] expdnrs = { 0 }; DistanceTest2("w1 W w2 W w3", expdnrs);
         }
         [Test]
-        public void Test2Nnested01()
+        public virtual void Test2Nnested01()
         {
             int[] expdnrs = { 0 }; DistanceTest2("w1 N w2 N w3", expdnrs);
         }
 
         [Test]
-        public void Test2Wnested02()
+        public virtual void Test2Wnested02()
         {
             int[] expdnrs = { 0, 1 }; DistanceTest2("w1 2W w2 2W w3", expdnrs);
         }
         [Test]
-        public void Test2Nnested02()
+        public virtual void Test2Nnested02()
         {
             int[] expdnrs = { 0, 1 }; DistanceTest2("w1 2N w2 2N w3", expdnrs);
         }
@@ -323,13 +323,13 @@ namespace Lucene.Net.QueryParsers.Surround.Query
 
         SingleFieldTestDb db3;
 
-        public void DistanceTest3(string query, int[] expdnrs)
+        public virtual void DistanceTest3(string query, int[] expdnrs)
         {
             DistanceTst(query, expdnrs, db3);
         }
 
         [Test]
-        public void Test3Example01()
+        public virtual void Test3Example01()
         {
             int[] expdnrs = { 0, 2 }; // query does not match doc 1 because "gradient" is in wrong place there.
             DistanceTest3("50n((low w pressure*) or depression*,"

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d4d462e3/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs b/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
index 4fe01c5..e484902 100644
--- a/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
@@ -11,12 +11,6 @@ using Lucene.Net.Util;
 using Lucene.Net.Util.Automaton;
 using NUnit.Framework;
 using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace Lucene.Net.QueryParsers.Util
 {
@@ -26,7 +20,7 @@ namespace Lucene.Net.QueryParsers.Util
     /// abstract classes.
     /// </summary>
     [TestFixture]
-    public class QueryParserTestBase : AbstractQueryParserTestBase
+    public abstract class QueryParserTestBase : LuceneTestCase
     {
         public static Analyzer qpAnalyzer;
 
@@ -113,82 +107,23 @@ namespace Lucene.Net.QueryParsers.Util
             originalMaxClauses = BooleanQuery.MaxClauseCount;
         }
 
-        // Moved from TestQueryParser
-        public virtual Classic.QueryParser GetParser(Analyzer a)
-        {
-            if (a == null) a = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true);
-            Classic.QueryParser qp = new Classic.QueryParser(TEST_VERSION_CURRENT, DefaultField, a);
-            qp.DefaultOperator = (QueryParserBase.OR_OPERATOR);
-            return qp;
-        }
-
-        // Moved to AbstractQueryParserTestBase
-        public override ICommonQueryParserConfiguration GetParserConfig(Analyzer a)
-        {
-            return GetParser(a);
-        }
-
-        // Moved to AbstractQueryParserTestBase
-        public override void SetDefaultOperatorOR(ICommonQueryParserConfiguration cqpC)
-        {
-            Debug.Assert(cqpC is Classic.QueryParser);
-            Classic.QueryParser qp = (Classic.QueryParser)cqpC;
-            qp.DefaultOperator = QueryParserBase.Operator.OR;
-        }
+        public abstract ICommonQueryParserConfiguration GetParserConfig(Analyzer a);
 
-        // Moved to AbstractQueryParserTestBase
-        public override void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC)
-        {
-            Debug.Assert(cqpC is Classic.QueryParser);
-            Classic.QueryParser qp = (Classic.QueryParser)cqpC;
-            qp.DefaultOperator = QueryParserBase.Operator.AND;
-        }
+        public abstract void SetDefaultOperatorOR(ICommonQueryParserConfiguration cqpC);
 
-        // Moved to AbstractQueryParserTestBase
-        public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value)
-        {
-            Debug.Assert(cqpC is Classic.QueryParser);
-            Classic.QueryParser qp = (Classic.QueryParser)cqpC;
-            qp.AnalyzeRangeTerms = (value);
-        }
+        public abstract void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC);
 
-        // Moved to AbstractQueryParserTestBase
-        public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value)
-        {
-            Debug.Assert(cqpC is Classic.QueryParser);
-            Classic.QueryParser qp = (Classic.QueryParser)cqpC;
-            qp.AutoGeneratePhraseQueries = value;
-        }
+        public abstract void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value);
 
-        // Moved to AbstractQueryParserTestBase
-        public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, ICharSequence field, DateTools.Resolution value)
-        {
-            Debug.Assert(cqpC is Classic.QueryParser);
-            Classic.QueryParser qp = (Classic.QueryParser)cqpC;
-            qp.SetDateResolution(field.toString(), value);
-        }
+        public abstract void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value);
 
-        // Moved to AbstractQueryParserTestBase
-        public override Query GetQuery(string query, ICommonQueryParserConfiguration cqpC)
-        {
-            Debug.Assert(cqpC != null, "Parameter must not be null");
-            Debug.Assert(cqpC is Classic.QueryParser, "Parameter must be instance of QueryParser");
-            Classic.QueryParser qp = (Classic.QueryParser)cqpC;
-            return qp.Parse(query);
-        }
+        public abstract void SetDateResolution(ICommonQueryParserConfiguration cqpC, ICharSequence field, DateTools.Resolution value);
 
-        // Moved to AbstractQueryParserTestBase
-        public override Query GetQuery(string query, Analyzer a)
-        {
-            return GetParser(a).Parse(query);
-        }
+        public abstract Query GetQuery(string query, ICommonQueryParserConfiguration cqpC);
 
+        public abstract Query GetQuery(string query, Analyzer a);
 
-        // Moved to AbstractQueryParserTestBase
-        public override bool IsQueryParserException(Exception exception)
-        {
-            return exception is ParseException;
-        }
+        public abstract bool IsQueryParserException(Exception exception);
 
         public Query GetQuery(string query)
         {
@@ -278,7 +213,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestCJK()
+        public virtual void TestCJK()
         {
             // Test Ideographic Space - As wide as a CJK character cell (fullwidth)
             // used google to translate the word "term" to japanese -> \u7528\u8a9e
@@ -316,7 +251,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestCJKTerm()
+        public virtual void TestCJKTerm()
         {
             // individual CJK chars as terms
             SimpleCJKAnalyzer analyzer = new SimpleCJKAnalyzer();
@@ -329,7 +264,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestCJKBoostedTerm()
+        public virtual void TestCJKBoostedTerm()
         {
             // individual CJK chars as terms
             SimpleCJKAnalyzer analyzer = new SimpleCJKAnalyzer();
@@ -343,7 +278,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestCJKPhrase()
+        public virtual void TestCJKPhrase()
         {
             // individual CJK chars as terms
             SimpleCJKAnalyzer analyzer = new SimpleCJKAnalyzer();
@@ -356,7 +291,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestCJKBoostedPhrase()
+        public virtual void TestCJKBoostedPhrase()
         {
             // individual CJK chars as terms
             SimpleCJKAnalyzer analyzer = new SimpleCJKAnalyzer();
@@ -370,7 +305,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestCJKSloppyPhrase()
+        public virtual void TestCJKSloppyPhrase()
         {
             // individual CJK chars as terms
             SimpleCJKAnalyzer analyzer = new SimpleCJKAnalyzer();
@@ -384,7 +319,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestAutoGeneratePhraseQueriesOn()
+        public virtual void TestAutoGeneratePhraseQueriesOn()
         {
             // individual CJK chars as terms
             SimpleCJKAnalyzer analyzer = new SimpleCJKAnalyzer();
@@ -398,7 +333,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestSimple()
+        public virtual void TestSimple()
         {
             AssertQueryEquals("term term term", null, "term term term");
             AssertQueryEquals("t�rm term term", new MockAnalyzer(Random()), "t�rm term term");
@@ -453,11 +388,7 @@ namespace Lucene.Net.QueryParsers.Util
 
         }
 
-        // Moved to AbstractQueryParserTestBase
-        public override void TestDefaultOperator()
-        {
-            throw new NotImplementedException();
-        }
+        public abstract void TestDefaultOperator();
 
         private class OperatorVsWhitespaceAnalyzer : Analyzer
         {
@@ -468,7 +399,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestOperatorVsWhitespace()
+        public virtual void TestOperatorVsWhitespace()
         { //LUCENE-2566
             // +,-,! should be directly adjacent to operand (i.e. not separated by whitespace) to be treated as an operator
             Analyzer a = new OperatorVsWhitespaceAnalyzer();
@@ -478,7 +409,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestPunct()
+        public virtual void TestPunct()
         {
             Analyzer a = new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false);
             AssertQueryEquals("a&b", a, "a&b");
@@ -487,7 +418,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestSlop()
+        public virtual void TestSlop()
         {
             AssertQueryEquals("\"term germ\"~2", null, "\"term germ\"~2");
             AssertQueryEquals("\"term germ\"~2 flork", null, "\"term germ\"~2 flork");
@@ -497,7 +428,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestNumber()
+        public virtual void TestNumber()
         {
             // The numbers go away because SimpleAnalzyer ignores them
             AssertQueryEquals("3", null, "");
@@ -511,7 +442,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestWildcard()
+        public virtual void TestWildcard()
         {
             AssertQueryEquals("term*", null, "term*");
             AssertQueryEquals("term*^2", null, "term*^2.0");
@@ -605,7 +536,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestLeadingWildcardType()
+        public virtual void TestLeadingWildcardType()
         {
             ICommonQueryParserConfiguration cqpC = GetParserConfig(null);
             cqpC.AllowLeadingWildcard = (true);
@@ -615,7 +546,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestQPA()
+        public virtual void TestQPA()
         {
             AssertQueryEquals("term term^3.0 term", qpAnalyzer, "term term^3.0 term");
             AssertQueryEquals("term stop^3.0 term", qpAnalyzer, "term term");
@@ -653,7 +584,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestRange()
+        public virtual void TestRange()
         {
             AssertQueryEquals("[ a TO z]", null, "[a TO z]");
             AssertQueryEquals("[ a TO z}", null, "[a TO z}");
@@ -692,7 +623,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestRangeWithPhrase()
+        public virtual void TestRangeWithPhrase()
         {
             AssertQueryEquals("[\\* TO \"*\"]", null, "[\\* TO \\*]");
             AssertQueryEquals("[\"*\" TO *]", null, "[\\* TO *]");
@@ -748,7 +679,7 @@ namespace Lucene.Net.QueryParsers.Util
 
         // TODO: Fix this test
         [Test]
-        public void TestDateRange()
+        public virtual void TestDateRange()
         {
             Assert.Fail("Test is not implemented");
 
@@ -797,7 +728,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestEscaped()
+        public virtual void TestEscaped()
         {
             Analyzer a = new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false);
 
@@ -887,7 +818,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestEscapedVsQuestionMarkAsWildcard()
+        public virtual void TestEscapedVsQuestionMarkAsWildcard()
         {
             Analyzer a = new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false);
             AssertQueryEquals("a:b\\-?c", a, "a:b\\-?c");
@@ -898,7 +829,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestQueryStringEscaping()
+        public virtual void TestQueryStringEscaping()
         {
             Analyzer a = new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false);
 
@@ -939,7 +870,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestTabNewlineCarriageReturn()
+        public virtual void TestTabNewlineCarriageReturn()
         {
             AssertQueryEqualsDOA("+weltbank +worlbank", null,
               "+weltbank +worlbank");
@@ -976,7 +907,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestSimpleDAO()
+        public virtual void TestSimpleDAO()
         {
             AssertQueryEqualsDOA("term term term", null, "+term +term +term");
             AssertQueryEqualsDOA("term +term term", null, "+term +term +term");
@@ -986,7 +917,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestBoost()
+        public virtual void TestBoost()
         {
             CharacterRunAutomaton stopWords = new CharacterRunAutomaton(BasicAutomata.MakeString("on"));
             Analyzer oneStopAnalyzer = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true, stopWords);
@@ -1044,7 +975,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestException()
+        public virtual void TestException()
         {
             AssertParseException("\"some phrase");
             AssertParseException("(foo bar");
@@ -1055,7 +986,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestBooleanQuery()
+        public virtual void TestBooleanQuery()
         {
             BooleanQuery.MaxClauseCount = (2);
             Analyzer purWhitespaceAnalyzer = new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false);
@@ -1063,7 +994,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestPrecedence()
+        public virtual void TestPrecedence()
         {
             ICommonQueryParserConfiguration qp = GetParserConfig(new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false));
             Query query1 = GetQuery("A AND B OR C AND D", qp);
@@ -1099,14 +1030,10 @@ namespace Lucene.Net.QueryParsers.Util
         //    iw.addDocument(d);
         //  }
 
-        // Moved to AbstractQueryParserTestBase
-        public override void TestStarParsing()
-        {
-            throw new NotImplementedException();
-        }
+        public abstract void TestStarParsing();
 
         [Test]
-        public void TestEscapedWildcard()
+        public virtual void TestEscapedWildcard()
         {
             ICommonQueryParserConfiguration qp = GetParserConfig(new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false));
             WildcardQuery q = new WildcardQuery(new Term("field", "foo\\?ba?r"));
@@ -1114,7 +1041,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestRegexps()
+        public virtual void TestRegexps()
         {
             ICommonQueryParserConfiguration qp = GetParserConfig(new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false));
             RegexpQuery q = new RegexpQuery(new Term("field", "[a-z][123]"));
@@ -1164,7 +1091,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestStopwords()
+        public virtual void TestStopwords()
         {
             CharacterRunAutomaton stopSet = new CharacterRunAutomaton(new RegExp("the|foo").ToAutomaton());
             ICommonQueryParserConfiguration qp = GetParserConfig(new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true, stopSet));
@@ -1183,7 +1110,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestPositionIncrement()
+        public virtual void TestPositionIncrement()
         {
             ICommonQueryParserConfiguration qp = GetParserConfig(new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true, MockTokenFilter.ENGLISH_STOPSET));
             qp.EnablePositionIncrements = (true);
@@ -1203,7 +1130,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestMatchAllDocs()
+        public virtual void TestMatchAllDocs()
         {
             ICommonQueryParserConfiguration qp = GetParserConfig(new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false));
             assertEquals(new MatchAllDocsQuery(), GetQuery("*:*", qp));
@@ -1235,7 +1162,7 @@ namespace Lucene.Net.QueryParsers.Util
         // enableStopPositionIncr & QueryParser's enablePosIncr
         // "match"
         [Test]
-        public void TestPositionIncrements()
+        public virtual void TestPositionIncrements()
         {
             using (Directory dir = NewDirectory())
             {
@@ -1324,11 +1251,7 @@ namespace Lucene.Net.QueryParsers.Util
             }
         }
 
-        // Moved to AbstractQueryParserTestBase
-        public override void TestNewFieldQuery()
-        {
-            throw new NotImplementedException();
-        }
+        public abstract void TestNewFieldQuery();
 
         /// <summary>
         /// Mock collation analyzer: indexes terms as "collated" + term
@@ -1368,7 +1291,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestCollatedRange()
+        public virtual void TestCollatedRange()
         {
             ICommonQueryParserConfiguration qp = GetParserConfig(new MockCollationAnalyzer());
             SetAnalyzeRangeTerms(qp, true);
@@ -1378,14 +1301,14 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestDistanceAsEditsParsing()
+        public virtual void TestDistanceAsEditsParsing()
         {
             FuzzyQuery q = (FuzzyQuery)GetQuery("foobar~2", new MockAnalyzer(Random()));
             assertEquals(2, q.MaxEdits);
         }
 
         [Test]
-        public void TestPhraseQueryToString()
+        public virtual void TestPhraseQueryToString()
         {
             Analyzer analyzer = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true, MockTokenFilter.ENGLISH_STOPSET);
             ICommonQueryParserConfiguration qp = GetParserConfig(analyzer);
@@ -1395,7 +1318,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestParseWildcardAndPhraseQueries()
+        public virtual void TestParseWildcardAndPhraseQueries()
         {
             string field = "content";
             string oldDefaultField = DefaultField;
@@ -1440,7 +1363,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestPhraseQueryPositionIncrements()
+        public virtual void TestPhraseQueryPositionIncrements()
         {
             CharacterRunAutomaton stopStopList =
             new CharacterRunAutomaton(new RegExp("[sS][tT][oO][pP]").ToAutomaton());
@@ -1458,7 +1381,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestMatchAllQueryParsing()
+        public virtual void TestMatchAllQueryParsing()
         {
             // test simple parsing of MatchAllDocsQuery
             string oldDefaultField = DefaultField;
@@ -1474,7 +1397,7 @@ namespace Lucene.Net.QueryParsers.Util
         }
 
         [Test]
-        public void TestNestedAndClausesFoo()
+        public virtual void TestNestedAndClausesFoo()
         {
             string query = "(field1:[1 TO *] AND field1:[* TO 2]) AND field2:(z)";
             BooleanQuery q = new BooleanQuery();
@@ -1486,38 +1409,4 @@ namespace Lucene.Net.QueryParsers.Util
             assertEquals(q, GetQuery(query, new MockAnalyzer(Random())));
         }
     }
-
-
-    /// <summary>
-    /// This class was added in .NET because the Visual Studio test runner
-    /// does not detect tests in abstract classes. Therefore, the abstract members
-    /// of QueryParserTestBase were moved here so the QueryParserTestBase class
-    /// could be made concrete.
-    /// </summary>
-    public abstract class AbstractQueryParserTestBase : LuceneTestCase
-    {
-        public abstract void TestStarParsing();
-
-        public abstract void TestNewFieldQuery();
-
-        public abstract void TestDefaultOperator();
-
-        public abstract ICommonQueryParserConfiguration GetParserConfig(Analyzer a);
-
-        public abstract void SetDefaultOperatorOR(ICommonQueryParserConfiguration cqpC);
-
-        public abstract void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC);
-
-        public abstract void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value);
-
-        public abstract void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value);
-
-        public abstract void SetDateResolution(ICommonQueryParserConfiguration cqpC, ICharSequence field, DateTools.Resolution value);
-
-        public abstract Query GetQuery(string query, ICommonQueryParserConfiguration cqpC);
-
-        public abstract Query GetQuery(string query, Analyzer a);
-
-        public abstract bool IsQueryParserException(Exception exception);
-    }
 }


[33/50] [abbrv] lucenenet git commit: Revert "HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context."

Posted by ni...@apache.org.
Revert "HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context."

This reverts commit 2a79edea6359e1ee1f83269cc7dc3ef2753ebf2c.


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

Branch: refs/heads/master
Commit: 92de8d7e53a47b324202dfb8a9b4d7eaca7b6712
Parents: d13c060
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Oct 20 18:15:38 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:59 2016 +0700

----------------------------------------------------------------------
 .../BaseCompressingDocValuesFormatTestCase.cs   |   3 -
 .../Index/BaseDocValuesFormatTestCase.cs        | 156 +++---
 .../Index/BaseIndexFileFormatTestCase.cs        |   2 +-
 .../Index/BasePostingsFormatTestCase.cs         |  14 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  22 +-
 .../Index/BaseTermVectorsFormatTestCase.cs      |  14 +-
 .../Util/BaseDocIdSetTestCase.cs                |  10 +-
 .../BlockTerms/TestFixedGapPostingsFormat.cs    |  63 ---
 .../Bloom/TestBloomPostingsFormat.cs            |  63 ---
 .../DiskDv/TestDiskDocValuesFormat.cs           | 526 ------------------
 .../IntBlock/TestFixedIntBlockPostingsFormat.cs |  63 ---
 .../TestVariableIntBlockPostingsFormat.cs       |  63 ---
 .../Memory/TestDirectDocValuesFormat.cs         | 501 ------------------
 .../Memory/TestDirectPostingsFormat.cs          |  63 ---
 .../Memory/TestFSTOrdPostingsFormat.cs          |  63 ---
 .../Memory/TestFSTOrdPulsing41PostingsFormat.cs |  63 ---
 .../Memory/TestFSTPostingsFormat.cs             |  63 ---
 .../Memory/TestFSTPulsing41PostingsFormat.cs    |  63 ---
 .../Memory/TestMemoryDocValuesFormat.cs         | 526 ------------------
 .../Memory/TestMemoryPostingsFormat.cs          |  62 ---
 .../Pulsing/TestPulsingPostingsFormat.cs        |  63 ---
 .../Sep/TestSepPostingsFormat.cs                |  62 ---
 .../SimpleText/TestSimpleTextDocValuesFormat.cs | 500 ------------------
 .../SimpleText/TestSimpleTextPostingsFormat.cs  |  63 ---
 .../TestSimpleTextStoredFieldsFormat.cs         |  88 ----
 .../TestSimpleTextTermVectorsFormat.cs          |  66 ---
 .../Index/Sorter/IndexSortingTest.cs            |  56 --
 .../Index/Sorter/SorterTestBase.cs              |  16 +-
 .../Index/Sorter/SortingAtomicReaderTest.cs     |  56 --
 .../Compressing/AbstractTestCompressionMode.cs  |  14 +-
 .../AbstractTestLZ4CompressionMode.cs           |   8 +-
 .../TestCompressingStoredFieldsFormat.cs        |  89 ----
 .../TestCompressingTermVectorsFormat.cs         |  67 ---
 .../Compressing/TestFastCompressionMode.cs      |  81 ---
 .../Compressing/TestFastDecompressionMode.cs    |  81 ---
 .../Compressing/TestHighCompressionMode.cs      |  50 --
 .../Lucene3x/TestLucene3xPostingsFormat.cs      |  63 ---
 .../Lucene3x/TestLucene3xStoredFieldsFormat.cs  |  84 ---
 .../Lucene3x/TestLucene3xTermVectorsFormat.cs   |  67 ---
 .../Lucene40/TestLucene40DocValuesFormat.cs     | 501 ------------------
 .../Lucene40/TestLucene40PostingsFormat.cs      |  63 ---
 .../Lucene40/TestLucene40StoredFieldsFormat.cs  |  89 ----
 .../Lucene40/TestLucene40TermVectorsFormat.cs   |  67 ---
 .../Codecs/Lucene41/TestBlockPostingsFormat.cs  |  65 ---
 .../Lucene41/TestLucene41StoredFieldsFormat.cs  |  89 ----
 .../Lucene42/TestLucene42DocValuesFormat.cs     | 526 ------------------
 .../Lucene45/TestLucene45DocValuesFormat.cs     | 527 -------------------
 .../Perfield/TestPerFieldDocValuesFormat.cs     | 501 ------------------
 .../Perfield/TestPerFieldPostingsFormat.cs      |  51 --
 .../core/Index/TestDocValuesFormat.cs           | 503 ------------------
 .../core/Index/TestLogMergePolicy.cs            |  15 -
 .../core/Index/TestNumericDocValuesUpdates.cs   |   2 +-
 .../TestPersistentSnapshotDeletionPolicy.cs     |  50 --
 .../core/Index/TestPostingsFormat.cs            |  50 --
 .../core/Index/TestStoredFieldsFormat.cs        |  83 ---
 .../core/Index/TestTermVectorsFormat.cs         |  55 --
 .../core/Index/TestTieredMergePolicy.cs         |  14 -
 .../core/Search/BaseTestRangeFilter.cs          |   2 +-
 .../Spans/TestSpanExplanationsOfNonMatches.cs   | 214 --------
 .../TestComplexExplanationsOfNonMatches.cs      | 160 ------
 .../core/Search/TestExplanations.cs             |   2 +-
 .../core/Search/TestFieldCacheRangeFilter.cs    |  14 -
 .../core/Search/TestFieldCacheRewriteMethod.cs  |  17 -
 .../core/Search/TestMultiTermConstantScore.cs   |  14 -
 .../TestSimpleExplanationsOfNonMatches.cs       | 452 ----------------
 .../core/Search/TestTermRangeFilter.cs          |  14 -
 .../core/Util/BaseSortTestCase.cs               |  18 +-
 .../core/Util/Packed/TestEliasFanoDocIdSet.cs   |  45 --
 .../core/Util/TestDocIdBitSet.cs                |  46 --
 .../core/Util/TestFixedBitSet.cs                |  45 --
 .../core/Util/TestInPlaceMergeSorter.cs         |  64 ---
 .../core/Util/TestIntroSorter.cs                |  64 ---
 .../core/Util/TestOpenBitSet.cs                 |  44 --
 .../core/Util/TestPForDeltaDocIdSet.cs          |  44 --
 src/Lucene.Net.Tests/core/Util/TestTimSorter.cs |  64 ---
 .../core/Util/TestWAH8DocIdSet.cs               |  44 --
 76 files changed, 140 insertions(+), 8455 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
index 54d7fd5..d88ecb4 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
@@ -45,7 +45,6 @@ namespace Lucene.Net.Index
             return size;
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestUniqueValuesCompression()
         {
             Directory dir = new RAMDirectory();
@@ -86,7 +85,6 @@ namespace Lucene.Net.Index
             Assert.IsTrue(size2 < size1 + 8 * 20);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDateCompression()
         {
             Directory dir = new RAMDirectory();
@@ -117,7 +115,6 @@ namespace Lucene.Net.Index
             Assert.IsTrue(size2 < size1 + (PackedInts.BitsRequired(day) * 50) / 8);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSingleBigValueCompression()
         {
             Directory dir = new RAMDirectory();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index fa46ef8..ebc4c19 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -84,7 +84,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestOneNumber()
         {
             Directory directory = NewDirectory();
@@ -119,7 +119,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestOneFloat()
         {
             Directory directory = NewDirectory();
@@ -154,7 +154,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoNumbers()
         {
             Directory directory = NewDirectory();
@@ -192,7 +192,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoBinaryValues()
         {
             Directory directory = NewDirectory();
@@ -233,7 +233,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoFieldsMixed()
         {
             Directory directory = NewDirectory();
@@ -273,7 +273,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestThreeFieldsMixed()
         {
             Directory directory = NewDirectory();
@@ -318,7 +318,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestThreeFieldsMixed2()
         {
             Directory directory = NewDirectory();
@@ -363,7 +363,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoDocumentsNumeric()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -392,7 +392,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -436,7 +436,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBigNumericRange()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -465,7 +465,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBigNumericRange2()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -494,7 +494,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -534,7 +534,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -580,7 +580,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -620,7 +620,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedBytesTwoDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -652,7 +652,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedBytesThreeDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -691,7 +691,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -742,7 +742,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedMergeAwayAllValues()
         {
             Directory directory = NewDirectory();
@@ -784,7 +784,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBytesWithNewline()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -810,7 +810,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestMissingSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -843,7 +843,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedTermsEnum()
         {
             Directory directory = NewDirectory();
@@ -916,7 +916,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestEmptySortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -948,7 +948,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestEmptyBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -980,7 +980,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestVeryLargeButLegalBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1009,7 +1009,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestVeryLargeButLegalSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1037,7 +1037,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestCodecUsesOwnBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1065,7 +1065,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestCodecUsesOwnSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1093,7 +1093,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestCodecUsesOwnBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1128,7 +1128,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestCodecUsesOwnSortedBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1166,7 +1166,7 @@ namespace Lucene.Net.Index
         /*
          * Simple test case to show how to use the API
          */
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestDocValuesSimple()
         {
             Directory dir = NewDirectory();
@@ -1211,7 +1211,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestRandomSortedBytes()
         {
             Directory dir = NewDirectory();
@@ -1488,7 +1488,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBooleanNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1498,7 +1498,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestByteNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1508,7 +1508,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestByteMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1518,7 +1518,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestShortNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1528,7 +1528,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestShortMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1538,7 +1538,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestIntNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1548,7 +1548,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestIntMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1558,7 +1558,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestLongNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1568,7 +1568,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestLongMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1643,7 +1643,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBinaryFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1654,7 +1654,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBinaryVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1788,7 +1788,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1799,7 +1799,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedFixedLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1810,7 +1810,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedVariableLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1820,7 +1820,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1830,7 +1830,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetOneValue()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1858,7 +1858,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1896,7 +1896,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoDocumentsMerged()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1941,7 +1941,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1974,7 +1974,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoValuesUnordered()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2007,7 +2007,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetThreeValuesTwoDocs()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2059,7 +2059,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoDocumentsLastMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2094,7 +2094,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoDocumentsLastMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2131,7 +2131,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoDocumentsFirstMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2167,7 +2167,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTwoDocumentsFirstMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2204,7 +2204,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetMergeAwayAllValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2235,7 +2235,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetTermsEnum()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2391,7 +2391,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetFixedLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2403,7 +2403,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetVariableLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2414,7 +2414,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetFixedLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2426,7 +2426,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetVariableLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2648,7 +2648,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetFixedLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2660,7 +2660,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestSortedSetVariableLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2671,7 +2671,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestGCDCompression()
         {
             int numIterations = AtLeast(1);
@@ -2704,13 +2704,13 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestZeros()
         {
             DoTestNumericsVsStoredFields(0, 0);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestZeroOrMin()
         {
             // try to make GCD compression fail if the format did not anticipate that
@@ -2738,7 +2738,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoNumbersOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2769,7 +2769,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2801,7 +2801,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestThreeNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2839,7 +2839,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoBytesOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2873,7 +2873,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestTwoBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2908,7 +2908,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestThreeBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2951,7 +2951,7 @@ namespace Lucene.Net.Index
         }
 
         // LUCENE-4853
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestHugeBinaryValues()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -3072,7 +3072,7 @@ namespace Lucene.Net.Index
         }
 
         // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestHugeBinaryValueLimit()
         {
             // We only test DVFormats that have a limit
@@ -3157,7 +3157,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
         /// </summary>
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestThreads()
         {
             Directory dir = NewDirectory();
@@ -3276,7 +3276,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Tests dv against stored fields with threads (all types + missing)
         /// </summary>
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestThreads2()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -3466,7 +3466,7 @@ namespace Lucene.Net.Index
         }
 
         // LUCENE-5218
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestEmptyBinaryValueOnPageSizes()
         {
             // Test larger and larger power-of-two sized values,

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
index 9a49a6f..d65a88b 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
@@ -90,7 +90,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// The purpose of this test is to make sure that bulk merge doesn't accumulate useless data over runs.
         /// </summary>
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestMergeStability()
         {
             Directory dir = NewDirectory();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
index ffef930..b9dfb8b 100644
--- a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
@@ -1245,43 +1245,43 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestDocsOnly()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_ONLY, false);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestDocsAndFreqs()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS, false);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestDocsAndFreqsAndPositions()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, false);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestDocsAndFreqsAndPositionsAndPayloads()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, true);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestDocsAndFreqsAndPositionsAndOffsets()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, false);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, true);
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestRandom()
         {
             int iters = 5;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index 2acb5fa..a63eb84 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -74,7 +74,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestRandomStoredFields()
         {
             Directory dir = NewDirectory();
@@ -190,7 +190,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         // LUCENE-1727: make sure doc fields are stored in order
         public virtual void TestStoredFieldsOrder()
         {
@@ -227,7 +227,7 @@ namespace Lucene.Net.Index
             d.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         // LUCENE-1219
         public virtual void TestBinaryFieldOffsetLength()
         {
@@ -261,7 +261,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestNumericField()
         {
             Directory dir = NewDirectory();
@@ -346,7 +346,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestIndexedBit()
         {
             Directory dir = NewDirectory();
@@ -365,7 +365,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestReadSkip()
         {
             Directory dir = NewDirectory();
@@ -420,7 +420,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestEmptyDocs()
         {
             Directory dir = NewDirectory();
@@ -449,7 +449,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         public virtual void TestConcurrentReads()
         {
             Directory dir = NewDirectory();
@@ -564,7 +564,7 @@ namespace Lucene.Net.Index
             return result;
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestWriteReadMerge()
         {
             // get another codec, other than the default: so we are merging segments across different codecs
@@ -670,7 +670,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test, LongRunningTest, Timeout(int.MaxValue)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, LongRunningTest, Timeout(int.MaxValue)]
         public virtual void TestBigDocuments()
         {
             // "big" as "much bigger than the chunk size"
@@ -747,7 +747,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestBulkMergeWithDeletes()
         {
             int numDocs = AtLeast(200);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index 5e5b20e..85207ad 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -668,7 +668,7 @@ namespace Lucene.Net.Index
             return (new IndexSearcher(reader)).Search(new TermQuery(new Term("id", id)), 1).ScoreDocs[0].Doc;
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         // only one doc with vectors
         public virtual void TestRareVectors()
         {
@@ -715,7 +715,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestHighFreqs()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 3, 5);
@@ -737,7 +737,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test, LongRunningTest, Timeout(int.MaxValue)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, LongRunningTest, Timeout(int.MaxValue)]
         public virtual void TestLotsOfFields()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 500, 10);
@@ -755,7 +755,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test, Timeout(300000)]
         // different options for the same field
         public virtual void TestMixedOptions()
         {
@@ -790,7 +790,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestRandom()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 5, 20);
@@ -817,7 +817,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestMerge()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 5, 20);
@@ -866,7 +866,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         // run random tests from different threads to make sure the per-thread clones
         // don't share mutable data
         public virtual void TestClone()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
index e69ed7c..2cfe630 100644
--- a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
@@ -77,7 +77,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=0.
         /// </summary>
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void TestNoBit()
         {
             BitArray bs = new BitArray(1);
@@ -88,7 +88,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=1.
         /// </summary>
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void Test1Bit()
         {
             BitArray bs = new BitArray(1);
@@ -103,7 +103,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=2.
         /// </summary>
-        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        [Test]
         public virtual void Test2Bits()
         {
             BitArray bs = new BitArray(2);
@@ -122,8 +122,8 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Compare the content of the set against a <seealso cref="BitSet"/>.
         /// </summary>
-        // [Test, Timeout(150000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
-        //[LongRunningTest]
+        [Test, Timeout(150000)]
+        [LongRunningTest]
         public virtual void TestAgainstBitSet()
         {
             int numBits = TestUtil.NextInt(Random(), 100, 1 << 20);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
index 6d913b5..a66f96c 100644
--- a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
@@ -38,68 +38,5 @@ namespace Lucene.Net.Codecs.BlockTerms
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
index d19e11a..d4e1286 100644
--- a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
@@ -35,68 +35,5 @@ namespace Lucene.Net.Codecs.Bloom
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
index cd69092..a0b868b 100644
--- a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
@@ -36,531 +36,5 @@ namespace Lucene.Net.Codecs.DiskDV
                 return codec;
             }
         }
-
-
-        #region BaseCompressingDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestUniqueValuesCompression()
-        {
-            base.TestUniqueValuesCompression();
-        }
-
-        [Test]
-        public override void TestDateCompression()
-        {
-            base.TestDateCompression();
-        }
-
-        [Test]
-        public override void TestSingleBigValueCompression()
-        {
-            base.TestSingleBigValueCompression();
-        }
-
-        #endregion
-
-        #region BaseDocValuesFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestOneNumber()
-        {
-            base.TestOneNumber();
-        }
-
-        [Test]
-        public override void TestOneFloat()
-        {
-            base.TestOneFloat();
-        }
-
-        [Test]
-        public override void TestTwoNumbers()
-        {
-            base.TestTwoNumbers();
-        }
-
-        [Test]
-        public override void TestTwoBinaryValues()
-        {
-            base.TestTwoBinaryValues();
-        }
-
-        [Test]
-        public override void TestTwoFieldsMixed()
-        {
-            base.TestTwoFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed()
-        {
-            base.TestThreeFieldsMixed();
-        }
-
-        [Test]
-        public override void TestThreeFieldsMixed2()
-        {
-            base.TestThreeFieldsMixed2();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsNumeric()
-        {
-            base.TestTwoDocumentsNumeric();
-        }
-
-        [Test]
-        public override void TestTwoDocumentsMerged()
-        {
-            base.TestTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestBigNumericRange()
-        {
-            base.TestBigNumericRange();
-        }
-
-        [Test]
-        public override void TestBigNumericRange2()
-        {
-            base.TestBigNumericRange2();
-        }
-
-        [Test]
-        public override void TestBytes()
-        {
-            base.TestBytes();
-        }
-
-        [Test]
-        public override void TestBytesTwoDocumentsMerged()
-        {
-            base.TestBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedBytes()
-        {
-            base.TestSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocuments()
-        {
-            base.TestSortedBytesTwoDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesThreeDocuments()
-        {
-            base.TestSortedBytesThreeDocuments();
-        }
-
-        [Test]
-        public override void TestSortedBytesTwoDocumentsMerged()
-        {
-            base.TestSortedBytesTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedMergeAwayAllValues()
-        {
-            base.TestSortedMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestBytesWithNewline()
-        {
-            base.TestBytesWithNewline();
-        }
-
-        [Test]
-        public override void TestMissingSortedBytes()
-        {
-            base.TestMissingSortedBytes();
-        }
-
-        [Test]
-        public override void TestSortedTermsEnum()
-        {
-            base.TestSortedTermsEnum();
-        }
-
-        [Test]
-        public override void TestEmptySortedBytes()
-        {
-            base.TestEmptySortedBytes();
-        }
-
-        [Test]
-        public override void TestEmptyBytes()
-        {
-            base.TestEmptyBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalBytes()
-        {
-            base.TestVeryLargeButLegalBytes();
-        }
-
-        [Test]
-        public override void TestVeryLargeButLegalSortedBytes()
-        {
-            base.TestVeryLargeButLegalSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytes()
-        {
-            base.TestCodecUsesOwnBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytes()
-        {
-            base.TestCodecUsesOwnSortedBytes();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnBytesEachTime()
-        {
-            base.TestCodecUsesOwnBytesEachTime();
-        }
-
-        [Test]
-        public override void TestCodecUsesOwnSortedBytesEachTime()
-        {
-            base.TestCodecUsesOwnSortedBytesEachTime();
-        }
-
-        /*
-         * Simple test case to show how to use the API
-         */
-        [Test]
-        public override void TestDocValuesSimple()
-        {
-            base.TestDocValuesSimple();
-        }
-
-        [Test]
-        public override void TestRandomSortedBytes()
-        {
-            base.TestRandomSortedBytes();
-        }
-
-        [Test]
-        public override void TestBooleanNumericsVsStoredFields()
-        {
-            base.TestBooleanNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteNumericsVsStoredFields()
-        {
-            base.TestByteNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestByteMissingVsFieldCache()
-        {
-            base.TestByteMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestShortNumericsVsStoredFields()
-        {
-            base.TestShortNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestShortMissingVsFieldCache()
-        {
-            base.TestShortMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestIntNumericsVsStoredFields()
-        {
-            base.TestIntNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestIntMissingVsFieldCache()
-        {
-            base.TestIntMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestLongNumericsVsStoredFields()
-        {
-            base.TestLongNumericsVsStoredFields();
-        }
-
-        [Test]
-        public override void TestLongMissingVsFieldCache()
-        {
-            base.TestLongMissingVsFieldCache();
-        }
-
-        [Test]
-        public override void TestBinaryFixedLengthVsStoredFields()
-        {
-            base.TestBinaryFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestBinaryVariableLengthVsStoredFields()
-        {
-            base.TestBinaryVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsStoredFields()
-        {
-            base.TestSortedFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedFixedLengthVsFieldCache()
-        {
-            base.TestSortedFixedLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsFieldCache()
-        {
-            base.TestSortedVariableLengthVsFieldCache();
-        }
-
-        [Test]
-        public override void TestSortedVariableLengthVsStoredFields()
-        {
-            base.TestSortedVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetOneValue()
-        {
-            base.TestSortedSetOneValue();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoFields()
-        {
-            base.TestSortedSetTwoFields();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsMerged()
-        {
-            base.TestSortedSetTwoDocumentsMerged();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValues()
-        {
-            base.TestSortedSetTwoValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoValuesUnordered()
-        {
-            base.TestSortedSetTwoValuesUnordered();
-        }
-
-        [Test]
-        public override void TestSortedSetThreeValuesTwoDocs()
-        {
-            base.TestSortedSetThreeValuesTwoDocs();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissing()
-        {
-            base.TestSortedSetTwoDocumentsLastMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsLastMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsLastMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissing()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissing();
-        }
-
-        [Test]
-        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
-        {
-            base.TestSortedSetTwoDocumentsFirstMissingMerge();
-        }
-
-        [Test]
-        public override void TestSortedSetMergeAwayAllValues()
-        {
-            base.TestSortedSetMergeAwayAllValues();
-        }
-
-        [Test]
-        public override void TestSortedSetTermsEnum()
-        {
-            base.TestSortedSetTermsEnum();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
-        {
-            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
-        }
-
-        [Test]
-        public override void TestSortedSetFixedLengthVsUninvertedField()
-        {
-            base.TestSortedSetFixedLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestSortedSetVariableLengthVsUninvertedField()
-        {
-            base.TestSortedSetVariableLengthVsUninvertedField();
-        }
-
-        [Test]
-        public override void TestGCDCompression()
-        {
-            base.TestGCDCompression();
-        }
-
-        [Test]
-        public override void TestZeros()
-        {
-            base.TestZeros();
-        }
-
-        [Test]
-        public override void TestZeroOrMin()
-        {
-            base.TestZeroOrMin();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissing()
-        {
-            base.TestTwoNumbersOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoNumbersOneMissingWithMerging()
-        {
-            base.TestTwoNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeNumbersOneMissingWithMerging()
-        {
-            base.TestThreeNumbersOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissing()
-        {
-            base.TestTwoBytesOneMissing();
-        }
-
-        [Test]
-        public override void TestTwoBytesOneMissingWithMerging()
-        {
-            base.TestTwoBytesOneMissingWithMerging();
-        }
-
-        [Test]
-        public override void TestThreeBytesOneMissingWithMerging()
-        {
-            base.TestThreeBytesOneMissingWithMerging();
-        }
-
-        // LUCENE-4853
-        [Test]
-        public override void TestHugeBinaryValues()
-        {
-            base.TestHugeBinaryValues();
-        }
-
-        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
-        public override void TestHugeBinaryValueLimit()
-        {
-            base.TestHugeBinaryValueLimit();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads()
-        {
-            base.TestThreads();
-        }
-
-        /// <summary>
-        /// Tests dv against stored fields with threads (all types + missing)
-        /// </summary>
-        [Test]
-        public override void TestThreads2()
-        {
-            base.TestThreads2();
-        }
-
-        // LUCENE-5218
-        [Test]
-        public override void TestEmptyBinaryValueOnPageSizes()
-        {
-            base.TestEmptyBinaryValueOnPageSizes();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
index 26b2684..1cd9e4b 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
@@ -36,68 +36,5 @@ namespace Lucene.Net.Codecs.IntBlock
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92de8d7e/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
index c255c90..0b74a74 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
@@ -41,68 +41,5 @@ namespace Lucene.Net.Codecs.IntBlock
                 return codec;
             }
         }
-
-
-        #region BasePostingsFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestDocsOnly()
-        {
-            base.TestDocsOnly();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqs()
-        {
-            base.TestDocsAndFreqs();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositions()
-        {
-            base.TestDocsAndFreqsAndPositions();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndPayloads();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsets()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsets();
-        }
-
-        [Test]
-        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
-        {
-            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
-        }
-
-        [Test]
-        public override void TestRandom()
-        {
-            base.TestRandom();
-        }
-
-        #endregion
-
-        #region BaseIndexFileFormatTestCase
-        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
-        // context in Visual Studio. This fixes that with the minimum amount of code necessary
-        // to run them in the correct context without duplicating all of the tests.
-
-        [Test]
-        public override void TestMergeStability()
-        {
-            base.TestMergeStability();
-        }
-
-        #endregion
     }
 }
\ No newline at end of file


[12/50] [abbrv] lucenenet git commit: Added parameter to [SuppressCodecs] attribute and added the attribute to all applicable classes in Lucene.Net.Tests

Posted by ni...@apache.org.
Added parameter to [SuppressCodecs] attribute and added the attribute to all applicable classes in Lucene.Net.Tests


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

Branch: refs/heads/master
Commit: 4c54ef2a3abf9ffdee6b586f78e4cb3e50720b82
Parents: fc40147
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 07:55:05 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:53 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs           | 7 +++----
 src/Lucene.Net.Tests/core/Index/Test2BBinaryDocValues.cs      | 1 +
 src/Lucene.Net.Tests/core/Index/Test2BNumericDocValues.cs     | 1 +
 src/Lucene.Net.Tests/core/Index/Test2BPositions.cs            | 1 +
 src/Lucene.Net.Tests/core/Index/Test2BPostings.cs             | 1 +
 src/Lucene.Net.Tests/core/Index/Test2BPostingsBytes.cs        | 1 +
 src/Lucene.Net.Tests/core/Index/Test2BSortedDocValues.cs      | 1 +
 src/Lucene.Net.Tests/core/Index/Test2BTerms.cs                | 1 +
 src/Lucene.Net.Tests/core/Index/Test4GBStoredFields.cs        | 1 +
 src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility.cs | 2 +-
 .../core/Index/TestBackwardsCompatibility3x.cs                | 3 +--
 src/Lucene.Net.Tests/core/Index/TestBagOfPositions.cs         | 6 ++++--
 src/Lucene.Net.Tests/core/Index/TestBagOfPostings.cs          | 1 +
 src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs | 1 +
 src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs            | 1 +
 src/Lucene.Net.Tests/core/Index/TestCustomNorms.cs            | 1 +
 src/Lucene.Net.Tests/core/Index/TestDocCount.cs               | 1 +
 src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs        | 1 +
 src/Lucene.Net.Tests/core/Index/TestDocValuesIndexing.cs      | 1 +
 src/Lucene.Net.Tests/core/Index/TestDocValuesWithThreads.cs   | 1 +
 src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs | 1 +
 src/Lucene.Net.Tests/core/Index/TestLongPostings.cs           | 1 +
 src/Lucene.Net.Tests/core/Index/TestMixedCodecs.cs            | 1 +
 src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs  | 1 +
 src/Lucene.Net.Tests/core/Index/TestMultiDocValues.cs         | 1 +
 src/Lucene.Net.Tests/core/Index/TestNRTThreads.cs             | 2 +-
 src/Lucene.Net.Tests/core/Index/TestNorms.cs                  | 1 +
 .../core/Index/TestNumericDocValuesUpdates.cs                 | 2 +-
 src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs      | 1 +
 src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs        | 1 +
 src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs              | 1 +
 .../core/Search/TestControlledRealTimeReopenThread.cs         | 1 +
 src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs      | 1 +
 src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs       | 1 +
 src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs         | 1 +
 src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs     | 1 +
 src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs       | 1 +
 src/Lucene.Net.Tests/core/Search/TestShardSearching.cs        | 1 +
 src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs         | 1 +
 src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs          | 1 +
 src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs                | 2 +-
 41 files changed, 46 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index cb6ee60..87f0edb 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -254,12 +254,11 @@ namespace Lucene.Net.Util
         [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
         public class SuppressCodecs : System.Attribute
         {
-            private string[] value;
-
-            public string[] Value()
+            public SuppressCodecs(params string[] value)
             {
-                return value;
+                this.Value = value;
             }
+            public string[] Value { get; private set; }
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test2BBinaryDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BBinaryDocValues.cs b/src/Lucene.Net.Tests/core/Index/Test2BBinaryDocValues.cs
index 4e137b3..00d9972 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BBinaryDocValues.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BBinaryDocValues.cs
@@ -31,6 +31,7 @@ namespace Lucene.Net.Index
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
     using MockDirectoryWrapper = Lucene.Net.Store.MockDirectoryWrapper;
 
+    [SuppressCodecs("Lucene3x")]
     [Ignore("takes ~ 45 minutes")]
     [TestFixture]
     public class Test2BBinaryDocValues : LuceneTestCase

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test2BNumericDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BNumericDocValues.cs b/src/Lucene.Net.Tests/core/Index/Test2BNumericDocValues.cs
index 57db3d0..1bebce0 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BNumericDocValues.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BNumericDocValues.cs
@@ -30,6 +30,7 @@ namespace Lucene.Net.Index
     using NumericDocValuesField = NumericDocValuesField;
 
     //@TimeoutSuite(millis = 80 * TimeUnits.HOUR) @Ignore("takes ~ 30 minutes") @SuppressCodecs("Lucene3x") public class Test2BNumericDocValues extends Lucene.Net.Util.LuceneTestCase
+    [SuppressCodecs("Lucene3x")]
     [Ignore("takes ~ 30 minutes")]
     [TestFixture]
     public class Test2BNumericDocValues : LuceneTestCase

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test2BPositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BPositions.cs b/src/Lucene.Net.Tests/core/Index/Test2BPositions.cs
index 3c98214..8ac6822 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BPositions.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BPositions.cs
@@ -43,6 +43,7 @@ namespace Lucene.Net.Index
     /// Test indexes ~82M docs with 52 positions each, so you get > Integer.MAX_VALUE positions
     /// @lucene.experimental
     /// </summary>
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class Test2BPositions : LuceneTestCase
     // uses lots of space and takes a few minutes

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test2BPostings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BPostings.cs b/src/Lucene.Net.Tests/core/Index/Test2BPostings.cs
index c431f62..b505cfb 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BPostings.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BPostings.cs
@@ -39,6 +39,7 @@ namespace Lucene.Net.Index
     /// Test indexes ~82M docs with 26 terms each, so you get > Integer.MAX_VALUE terms/docs pairs
     /// @lucene.experimental
     /// </summary>
+    [SuppressCodecs("SimpleText", "Memory", "Direct", "Compressing")]
     [TestFixture]
     public class Test2BPostings : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test2BPostingsBytes.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BPostingsBytes.cs b/src/Lucene.Net.Tests/core/Index/Test2BPostingsBytes.cs
index a402dc9..910263d 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BPostingsBytes.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BPostingsBytes.cs
@@ -43,6 +43,7 @@ namespace Lucene.Net.Index
     /// so you get > Integer.MAX_VALUE postings data for the term
     /// @lucene.experimental
     /// </summary>
+    [SuppressCodecs("SimpleText", "Memory", "Direct", "Lucene3x")]
     [TestFixture]
     public class Test2BPostingsBytes : LuceneTestCase
     // disable Lucene3x: older lucene formats always had this issue.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test2BSortedDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BSortedDocValues.cs b/src/Lucene.Net.Tests/core/Index/Test2BSortedDocValues.cs
index 55e0218..75b6805 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BSortedDocValues.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BSortedDocValues.cs
@@ -29,6 +29,7 @@ namespace Lucene.Net.Index
     using MockDirectoryWrapper = Lucene.Net.Store.MockDirectoryWrapper;
     using SortedDocValuesField = SortedDocValuesField;
 
+    [SuppressCodecs("Lucene3x")]
     [Ignore("very slow")]
     [TestFixture]
     public class Test2BSortedDocValues : LuceneTestCase

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test2BTerms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BTerms.cs b/src/Lucene.Net.Tests/core/Index/Test2BTerms.cs
index 9c7870d..f896a57 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BTerms.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BTerms.cs
@@ -45,6 +45,7 @@ namespace Lucene.Net.Index
     //
     //   java -server -Xmx8g -d64 -cp .:lib/junit-4.10.jar:./build/classes/test:./build/classes/test-framework:./build/classes/java -Dlucene.version=4.0-dev -Dtests.directory=MMapDirectory -DtempDir=build -ea org.junit.runner.JUnitCore Lucene.Net.Index.Test2BTerms
     //
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [Ignore]
     [TestFixture]
     public class Test2BTerms : LuceneTestCase

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/Test4GBStoredFields.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test4GBStoredFields.cs b/src/Lucene.Net.Tests/core/Index/Test4GBStoredFields.cs
index ee20446..5748354 100644
--- a/src/Lucene.Net.Tests/core/Index/Test4GBStoredFields.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test4GBStoredFields.cs
@@ -35,6 +35,7 @@ namespace Lucene.Net.Index
     /// <summary>
     /// this test creates an index with one segment that is a little larger than 4GB.
     /// </summary>
+    [SuppressCodecs("SimpleText")]
     [TestFixture]
     public class Test4GBStoredFields : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility.cs b/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility.cs
index 28ea3e7..1dd70ce 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility.cs
@@ -74,7 +74,7 @@ namespace Lucene.Net.Index
     // we won't even be running the actual code, only the impostor
     // @SuppressCodecs("Lucene4x")
     // Sep codec cannot yet handle the offsets in our 4.x index!
-    //[SuppressCodecs("Lucene4x")] // LUCENENET TODO: SuppressCodecs doesn't accept a parameter
+    [SuppressCodecs("Lucene3x", "MockFixedIntBlock", "MockVariableIntBlock", "MockSep", "MockRandom", "Lucene40", "Lucene41", "Appending", "Lucene42", "Lucene45")]
     [TestFixture]
     public class TestBackwardsCompatibility : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility3x.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility3x.cs b/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility3x.cs
index 99b9afd..af1790f 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility3x.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBackwardsCompatibility3x.cs
@@ -69,8 +69,7 @@ namespace Lucene.Net.Index
     // don't use 3.x codec, its unrealistic since it means
     // we won't even be running the actual code, only the impostor
     // Sep codec cannot yet handle the offsets we add when changing indexes!
-    // LUCENENET TODO: SuppressCodecs doesn't have a parameter
-    //[SuppressCodecs(new string[] {"Lucene3x", "MockFixedIntBlock", "MockVariableIntBlock", "MockSep", "MockRandom", "Lucene40", "Lucene41", "Appending", "Lucene42", "Lucene45"})]
+    [SuppressCodecs("Lucene3x", "MockFixedIntBlock", "MockVariableIntBlock", "MockSep", "MockRandom", "Lucene40", "Lucene41", "Appending", "Lucene42", "Lucene45")]
     [TestFixture]
     public class TestBackwardsCompatibility3x : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestBagOfPositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBagOfPositions.cs b/src/Lucene.Net.Tests/core/Index/TestBagOfPositions.cs
index a82e3a6..aee679a 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBagOfPositions.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBagOfPositions.cs
@@ -42,9 +42,11 @@ namespace Lucene.Net.Index
     /// totalTermFreq of its integer value, and checks that the totalTermFreq is correct.
     /// </summary>
     // TODO: somehow factor this with BagOfPostings? its almost the same
+    [SuppressCodecs("Direct", "Memory", "Lucene3x")] // at night this makes like 200k/300k docs and will make Direct's heart beat!
+                                                     // Lucene3x doesnt have totalTermFreq, so the test isn't interesting there.
     [TestFixture]
-    public class TestBagOfPositions : LuceneTestCase // at night this makes like 200k/300k docs and will make Direct's heart beat!
-    // Lucene3x doesnt have totalTermFreq, so the test isn't interesting there.
+    public class TestBagOfPositions : LuceneTestCase
+    
     {
         [Test]
         public virtual void Test()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestBagOfPostings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBagOfPostings.cs b/src/Lucene.Net.Tests/core/Index/TestBagOfPostings.cs
index 6f4741e..a1b461b 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBagOfPostings.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBagOfPostings.cs
@@ -40,6 +40,7 @@ namespace Lucene.Net.Index
     /// Simple test that adds numeric terms, where each term has the
     /// docFreq of its integer value, and checks that the docFreq is correct.
     /// </summary>
+    [SuppressCodecs("Direct", "Memory")]
     [TestFixture]
     public class TestBagOfPostings : LuceneTestCase // at night this makes like 200k/300k docs and will make Direct's heart beat!
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
index 835f7e2..cebc398 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
@@ -52,6 +52,7 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
+    [SuppressCodecs("Appending", "Lucene3x", "Lucene40", "Lucene41", "Lucene42", "Lucene45")]
     [TestFixture]
     public class TestBinaryDocValuesUpdates : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs b/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
index 2ae675c..f536ae8 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
@@ -34,6 +34,7 @@ namespace Lucene.Net.Index
     /// <summary>
     /// Test indexing and searching some byte[] terms
     /// </summary>
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestBinaryTerms : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestCustomNorms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestCustomNorms.cs b/src/Lucene.Net.Tests/core/Index/TestCustomNorms.cs
index b197cb5..aeca36d 100644
--- a/src/Lucene.Net.Tests/core/Index/TestCustomNorms.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestCustomNorms.cs
@@ -37,6 +37,7 @@ namespace Lucene.Net.Index
     using TestUtil = Lucene.Net.Util.TestUtil;
     using TextField = TextField;
 
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestCustomNorms : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocCount.cs b/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
index 01ef636..72fe0bd 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
@@ -33,6 +33,7 @@ namespace Lucene.Net.Index
     /// <summary>
     /// Tests the Terms.DocCount statistic
     /// </summary>
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestDocCount : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
index 3e92567..628ddc0 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
@@ -26,6 +26,7 @@ namespace Lucene.Net.Index
     /// Tests the codec configuration defined by LuceneTestCase randomly
     ///  (typically a mix across different fields).
     /// </summary>
+    [SuppressCodecs("Lucene3x")]
     public class TestDocValuesFormat : BaseDocValuesFormatTestCase
     {
         protected override Codec Codec

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestDocValuesIndexing.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocValuesIndexing.cs b/src/Lucene.Net.Tests/core/Index/TestDocValuesIndexing.cs
index 8aeddf0..d146736 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocValuesIndexing.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocValuesIndexing.cs
@@ -45,6 +45,7 @@ namespace Lucene.Net.Index
     /// Tests DocValues integration into IndexWriter
     ///
     /// </summary>
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestDocValuesIndexing : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestDocValuesWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocValuesWithThreads.cs b/src/Lucene.Net.Tests/core/Index/TestDocValuesWithThreads.cs
index 3ba618a..3300160 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocValuesWithThreads.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocValuesWithThreads.cs
@@ -38,6 +38,7 @@ namespace Lucene.Net.Index
     using SortedDocValuesField = SortedDocValuesField;
     using TestUtil = Lucene.Net.Util.TestUtil;
 
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestDocValuesWithThreads : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
index 103248f..7fb109c 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
@@ -50,6 +50,7 @@ namespace Lucene.Net.Index
     /// <summary>
     /// MultiThreaded IndexWriter tests
     /// </summary>
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestIndexWriterWithThreads : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestLongPostings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestLongPostings.cs b/src/Lucene.Net.Tests/core/Index/TestLongPostings.cs
index 8afe0dc..b789db5 100644
--- a/src/Lucene.Net.Tests/core/Index/TestLongPostings.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestLongPostings.cs
@@ -41,6 +41,7 @@ namespace Lucene.Net.Index
     using TextField = TextField;
     using TokenStream = Lucene.Net.Analysis.TokenStream;
 
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestLongPostings : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestMixedCodecs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestMixedCodecs.cs b/src/Lucene.Net.Tests/core/Index/TestMixedCodecs.cs
index 723bf74..56ba215 100644
--- a/src/Lucene.Net.Tests/core/Index/TestMixedCodecs.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestMixedCodecs.cs
@@ -32,6 +32,7 @@ namespace Lucene.Net.Index
     using MockAnalyzer = Lucene.Net.Analysis.MockAnalyzer;
     using TestUtil = Lucene.Net.Util.TestUtil;
 
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestMixedCodecs : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
index eb666e8..18c3210 100644
--- a/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
@@ -39,6 +39,7 @@ namespace Lucene.Net.Index
      * limitations under the License.
      */
 
+    [SuppressCodecs("Appending", "Lucene3x", "Lucene40", "Lucene41", "Lucene42", "Lucene45")]
     [TestFixture]
     public class TestMixedDocValuesUpdates : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestMultiDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestMultiDocValues.cs b/src/Lucene.Net.Tests/core/Index/TestMultiDocValues.cs
index b67ea7e..8be7ac0 100644
--- a/src/Lucene.Net.Tests/core/Index/TestMultiDocValues.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestMultiDocValues.cs
@@ -37,6 +37,7 @@ namespace Lucene.Net.Index
 
     /// <summary>
     /// Tests MultiDocValues versus ordinary segment merging </summary>
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestMultiDocValues : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestNRTThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestNRTThreads.cs b/src/Lucene.Net.Tests/core/Index/TestNRTThreads.cs
index e248d2e..acb603d 100644
--- a/src/Lucene.Net.Tests/core/Index/TestNRTThreads.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestNRTThreads.cs
@@ -32,7 +32,7 @@ namespace Lucene.Net.Index
     // TODO
     //   - mix in forceMerge, addIndexes
     //   - randomoly mix in non-congruent docs
-
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestNRTThreads : ThreadedIndexingAndSearchingTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestNorms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestNorms.cs b/src/Lucene.Net.Tests/core/Index/TestNorms.cs
index 124d688..2facf44 100644
--- a/src/Lucene.Net.Tests/core/Index/TestNorms.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestNorms.cs
@@ -44,6 +44,7 @@ namespace Lucene.Net.Index
     /// Test that norms info is preserved during index life - including
     /// separate norms, addDocument, addIndexes, forceMerge.
     /// </summary>
+    [SuppressCodecs("Memory", "Direct", "SimpleText")]
     [TestFixture]
     public class TestNorms : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
index 5661c05..c48b98f 100644
--- a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Index
      * See the License for the specific language governing permissions and
      * limitations under the License.
      */
-
+    [SuppressCodecs("Appending", "Lucene3x", "Lucene40", "Lucene41", "Lucene42", "Lucene45")]
     [TestFixture]
     public class TestNumericDocValuesUpdates : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs b/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
index b785164..daa8e2c 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
@@ -38,6 +38,7 @@ namespace Lucene.Net.Index
     using Token = Lucene.Net.Analysis.Token;
     using TokenStream = Lucene.Net.Analysis.TokenStream;
 
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestPayloadsOnVectors : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs b/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
index 8b0e0ba..168c540 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
@@ -50,6 +50,7 @@ namespace Lucene.Net.Index
     // TODO: we really need to test indexingoffsets, but then getting only docs / docs + freqs.
     // not all codecs store prx separate...
     // TODO: fix sep codec to index offsets so we can greatly reduce this list!
+    [SuppressCodecs("Lucene3x", "MockFixedIntBlock", "MockVariableIntBlock", "MockSep", "MockRandom")]
     [TestFixture]
     public class TestPostingsOffsets : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs b/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
index 39c404c..5895c23 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
@@ -42,6 +42,7 @@ namespace Lucene.Net.Index
     using RegExp = Lucene.Net.Util.Automaton.RegExp;
     using TestUtil = Lucene.Net.Util.TestUtil;
 
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestTermsEnum : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs b/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
index 50c067d..5787ec8 100644
--- a/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestControlledRealTimeReopenThread.cs
@@ -54,6 +54,7 @@ namespace Lucene.Net.Search
     //using ThreadInterruptedException = Lucene.Net.Util.ThreadInterruptedException;
     using Version = Lucene.Net.Util.LuceneVersion;
 
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestControlledRealTimeReopenThread : ThreadedIndexingAndSearchingTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs b/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
index ba42db2..1fda883 100644
--- a/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
@@ -42,6 +42,7 @@ namespace Lucene.Net.Search
     /// In the example, a docvalues field is used as a per-document boost (separate from the norm)
     /// @lucene.experimental
     /// </summary>
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestDocValuesScoring : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs b/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
index eab721a..c452619 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
@@ -47,6 +47,7 @@ namespace Lucene.Net.Search
 
     /// <summary>
     /// tests BooleanScorer2's minShouldMatch </summary>
+    [SuppressCodecs("Appending", "Lucene3x", "Lucene40", "Lucene41")]
     [TestFixture]
     public class TestMinShouldMatch2 : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs b/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
index ac811ca..c308e08 100644
--- a/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
@@ -44,6 +44,7 @@ namespace Lucene.Net.Search
     using Term = Lucene.Net.Index.Term;
     using TestUtil = Lucene.Net.Util.TestUtil;
 
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestQueryRescorer : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs b/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
index 6557fc7..da828ab 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
@@ -33,6 +33,7 @@ namespace Lucene.Net.Search
     using RandomIndexWriter = Lucene.Net.Index.RandomIndexWriter;
     using Term = Lucene.Net.Index.Term;
 
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestSearchWithThreads : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs b/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
index 5d8d0ab..0a44a30 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
@@ -42,6 +42,7 @@ namespace Lucene.Net.Search
     using TestUtil = Lucene.Net.Util.TestUtil;
     using ThreadedIndexingAndSearchingTestCase = Lucene.Net.Index.ThreadedIndexingAndSearchingTestCase;
 
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestSearcherManager : ThreadedIndexingAndSearchingTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs b/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
index ba4b406..1e7b48a 100644
--- a/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
@@ -42,6 +42,7 @@ namespace Lucene.Net.Search
     //   - test pulling docs in 2nd round trip...
     //   - filter too
 
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestShardSearching : ShardSearchingTestBase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs b/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
index a780c85..6cbb6e0 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
@@ -39,6 +39,7 @@ namespace Lucene.Net.Search
     /// These are mostly like TestSort's tests, except each test
     /// indexes the field up-front as docvalues, and checks no fieldcaches were made
     /// </summary>
+    [SuppressCodecs("Lucene3x", "Appending", "Lucene40", "Lucene41", "Lucene42")] // avoid codecs that don't support "missing"
     [TestFixture]
     public class TestSortDocValues : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs b/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
index 8bc3712..d834327 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
@@ -37,6 +37,7 @@ namespace Lucene.Net.Search
     using Term = Lucene.Net.Index.Term;
     using TestUtil = Lucene.Net.Util.TestUtil;
 
+    [SuppressCodecs("Lucene3x")]
     [TestFixture]
     public class TestSortRescorer : LuceneTestCase
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c54ef2a/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs b/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
index 8dde689..5386544 100644
--- a/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
+++ b/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
@@ -61,7 +61,7 @@ namespace Lucene.Net.Util.Fst
     using Terms = Lucene.Net.Index.Terms;
     using TermsEnum = Lucene.Net.Index.TermsEnum;
 
-
+    [SuppressCodecs("SimpleText", "Memory", "Direct")]
     [TestFixture]
     public class TestFSTs : LuceneTestCase
     {


[14/50] [abbrv] lucenenet git commit: Fixed bug in Core.Index.TestIndexWriter.TestWickedLongTerm() that caused the test not to complete.

Posted by ni...@apache.org.
Fixed bug in Core.Index.TestIndexWriter.TestWickedLongTerm() that caused the test not to complete.


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

Branch: refs/heads/master
Commit: 6441534ddfb2eb8210d332a9206875066c8ada52
Parents: 1e1a500
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 10:01:43 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:54 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6441534d/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
index 0a4054a..df20db3 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
@@ -1929,7 +1929,7 @@ namespace Lucene.Net.Index
                 StringBuilder b = new StringBuilder();
                 char[] buffer = new char[1024];
                 int n;
-                while ((n = input.Read(buffer, 0, buffer.Length)) != -1)
+                while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
                 {
                     b.Append(buffer, 0, n);
                 }
@@ -1943,8 +1943,6 @@ namespace Lucene.Net.Index
         [Test]
         public virtual void TestWickedLongTerm()
         {
-            fail("Test has infinite recursion");
-
             Directory dir = NewDirectory();
             RandomIndexWriter w = new RandomIndexWriter(Random(), dir, new StringSplitAnalyzer(), Similarity, TimeZone);
 


[09/50] [abbrv] lucenenet git commit: Added missing test Core.TestWorstCaseBehavior

Posted by ni...@apache.org.
Added missing test Core.TestWorstCaseBehavior


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

Branch: refs/heads/master
Commit: fc40147ed85e3a81b81f0b1f276ec3f41c01d265
Parents: 7517a73
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 06:48:16 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:52 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Lucene.Net.Tests.csproj    |   1 +
 .../core/TestWorstCaseTestBehavior.cs           | 253 +++++++++----------
 2 files changed, 126 insertions(+), 128 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fc40147e/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index 8cf8890..7d6d99f 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -484,6 +484,7 @@
     </Compile>
     <Compile Include="core\TestSearch.cs" />
     <Compile Include="core\TestSearchForDuplicates.cs" />
+    <Compile Include="core\TestWorstCaseTestBehavior.cs" />
     <Compile Include="core\Util\Automaton\TestBasicOperations.cs">
       <SubType>Code</SubType>
     </Compile>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fc40147e/src/Lucene.Net.Tests/core/TestWorstCaseTestBehavior.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/TestWorstCaseTestBehavior.cs b/src/Lucene.Net.Tests/core/TestWorstCaseTestBehavior.cs
index ac07b2c..ee0a0b9 100644
--- a/src/Lucene.Net.Tests/core/TestWorstCaseTestBehavior.cs
+++ b/src/Lucene.Net.Tests/core/TestWorstCaseTestBehavior.cs
@@ -1,16 +1,12 @@
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+using NUnit.Framework;
 using System;
 using System.Threading;
 
-namespace org.apache.lucene
+namespace Lucene.Net
 {
-
-	using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
-	//using Ignore = org.junit.Ignore;
-
-	//using RandomizedTest = com.carrotsearch.randomizedtesting.RandomizedTest;
-	//using Timeout = com.carrotsearch.randomizedtesting.annotations.Timeout;
-
-	/*
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -27,123 +23,124 @@ namespace org.apache.lucene
 	 * limitations under the License.
 	 */
 
-	public class TestWorstCaseTestBehavior : LuceneTestCase
-	{
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Ignore public void testThreadLeak()
-	  public virtual void TestThreadLeak()
-	  {
-		Thread t = new ThreadAnonymousInnerClassHelper(this);
-		t.Start();
-
-		while (!t.IsAlive)
-		{
-		  Thread.@Yield();
-		}
-
-		// once alive, leave it to run outside of the test scope.
-	  }
-
-	  private class ThreadAnonymousInnerClassHelper : Thread
-	  {
-		  private readonly TestWorstCaseTestBehavior OuterInstance;
-
-		  public ThreadAnonymousInnerClassHelper(TestWorstCaseTestBehavior outerInstance)
-		  {
-			  this.OuterInstance = outerInstance;
-		  }
-
-		  public override void Run()
-		  {
-			try
-			{
-			  Thread.Sleep(10000);
-			}
-			catch (InterruptedException e)
-			{
-			  // Ignore.
-			}
-		  }
-	  }
-
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Ignore public void testLaaaaaargeOutput() throws Exception
-	  public virtual void TestLaaaaaargeOutput()
-	  {
-		string message = "I will not OOM on large output";
-		int howMuch = 250 * 1024 * 1024;
-		for (int i = 0; i < howMuch; i++)
-		{
-		  if (i > 0)
-		  {
-			  Console.Write(",\n");
-		  }
-		  Console.Write(message);
-		  howMuch -= message.Length; // approximately.
-		}
-		Console.WriteLine(".");
-	  }
-
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Ignore public void testProgressiveOutput() throws Exception
-	  public virtual void TestProgressiveOutput()
-	  {
-		for (int i = 0; i < 20; i++)
-		{
-		  Console.WriteLine("Emitting sysout line: " + i);
-		  Console.Error.WriteLine("Emitting syserr line: " + i);
-		  System.out.flush();
-		  System.err.flush();
-		  RandomizedTest.sleep(1000);
-		}
-	  }
-
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Ignore public void testUncaughtException() throws Exception
-	  public virtual void TestUncaughtException()
-	  {
-		Thread t = new ThreadAnonymousInnerClassHelper2(this);
-		t.Start();
-		t.Join();
-	  }
-
-	  private class ThreadAnonymousInnerClassHelper2 : System.Threading.Thread
-	  {
-		  private readonly TestWorstCaseTestBehavior OuterInstance;
-
-		  public ThreadAnonymousInnerClassHelper2(TestWorstCaseTestBehavior outerInstance)
-		  {
-			  this.OuterInstance = outerInstance;
-		  }
-
-		  public override void Run()
-		  {
-			throw new Exception("foobar");
-		  }
-	  }
-
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Ignore @Timeout(millis = 500) public void testTimeout() throws Exception
-	  public virtual void TestTimeout()
-	  {
-		Thread.Sleep(5000);
-	  }
-
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Ignore @Timeout(millis = 1000) public void testZombie() throws Exception
-	  public virtual void TestZombie()
-	  {
-		while (true)
-		{
-		  try
-		  {
-			Thread.Sleep(1000);
-		  }
-		  catch (InterruptedException e)
-		  {
-		  }
-		}
-	  }
-	}
-
+    public class TestWorstCaseTestBehavior : LuceneTestCase
+    {
+        [Ignore]
+        [Test]
+        public virtual void TestThreadLeak()
+        {
+            ThreadClass t = new ThreadAnonymousInnerClassHelper(this);
+            t.Start();
+
+            while (!t.IsAlive)
+            {
+                Thread.@Yield();
+            }
+
+            // once alive, leave it to run outside of the test scope.
+        }
+
+        private class ThreadAnonymousInnerClassHelper : ThreadClass
+        {
+            private readonly TestWorstCaseTestBehavior OuterInstance;
+
+            public ThreadAnonymousInnerClassHelper(TestWorstCaseTestBehavior outerInstance)
+            {
+                this.OuterInstance = outerInstance;
+            }
+
+            public override void Run()
+            {
+                try
+                {
+                    Thread.Sleep(10000);
+                }
+                catch (ThreadInterruptedException e)
+                {
+                    // Ignore.
+                }
+            }
+        }
+
+        [Ignore]
+        [Test]
+        public virtual void TestLaaaaaargeOutput()
+        {
+            string message = "I will not OOM on large output";
+            int howMuch = 250 * 1024 * 1024;
+            for (int i = 0; i < howMuch; i++)
+            {
+                if (i > 0)
+                {
+                    Console.Write(",\n");
+                }
+                Console.Write(message);
+                howMuch -= message.Length; // approximately.
+            }
+            Console.WriteLine(".");
+        }
+
+
+        [Ignore]
+        [Test]
+        public virtual void TestProgressiveOutput()
+        {
+            for (int i = 0; i < 20; i++)
+            {
+                Console.WriteLine("Emitting sysout line: " + i);
+                Console.Error.WriteLine("Emitting syserr line: " + i);
+                Console.Out.Flush();
+                Console.Error.Flush();
+                Thread.Sleep(1000);
+            }
+        }
+
+        [Ignore]
+        [Test]
+        public virtual void TestUncaughtException()
+        {
+            ThreadClass t = new ThreadAnonymousInnerClassHelper2(this);
+            t.Start();
+            t.Join();
+        }
+
+        private class ThreadAnonymousInnerClassHelper2 : ThreadClass
+        {
+            private readonly TestWorstCaseTestBehavior OuterInstance;
+
+            public ThreadAnonymousInnerClassHelper2(TestWorstCaseTestBehavior outerInstance)
+            {
+                this.OuterInstance = outerInstance;
+            }
+
+            public override void Run()
+            {
+                throw new Exception("foobar");
+            }
+        }
+
+        [Ignore]
+        [Test, Timeout(500)]
+        public virtual void TestTimeout()
+        {
+            Thread.Sleep(5000);
+        }
+
+
+        [Ignore]
+        [Test, Timeout(1000)]
+        public virtual void TestZombie()
+        {
+            while (true)
+            {
+                try
+                {
+                    Thread.Sleep(1000);
+                }
+                catch (ThreadInterruptedException e)
+                {
+                }
+            }
+        }
+    }
 }
\ No newline at end of file


[45/50] [abbrv] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
index ace0574..889f963 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
@@ -35,5 +35,506 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
index 990e29c..0bfd3d7 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
@@ -36,5 +36,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
index 6f30a01..910584c 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
index ddb99c6..eb47d6c 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
index cac7e77..7e094fd 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
index e9beed4..13afde6 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
index 4f65807..33895b1 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
@@ -40,5 +40,531 @@ namespace Lucene.Net.Codecs.Memory
         {
             return false;
         }
+
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
index 938ae52..0f35370 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
@@ -36,5 +36,67 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
index cd6f9f2..19cd845 100644
--- a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
@@ -36,5 +36,68 @@ namespace Lucene.Net.Codecs.Pulsing
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
index c374053..d1c5f29 100644
--- a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
@@ -37,5 +37,67 @@ namespace Lucene.Net.Codecs.Sep
                 return codec;
             }
         }
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
index 497e26f..bdd6d82 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
@@ -42,5 +42,505 @@ namespace Lucene.Net.Codecs.SimpleText
                 return codec;
             }
         }
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
index a8cb997..96e6cb8 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
@@ -34,5 +34,68 @@ namespace Lucene.Net.Codecs.SimpleText
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
index 5dab469..1d3ae31 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
@@ -31,5 +31,93 @@ namespace Lucene.Net.Codecs.SimpleText
                 return new SimpleTextCodec();
             }
         }
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, LongRunningTest]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
index a5fe4c5..527deea 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
@@ -30,5 +30,71 @@ namespace Lucene.Net.Codecs.SimpleText
                 return new SimpleTextCodec();
             }
         }
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test, Timeout(300000)]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
index 164f275..fdc0e95 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
@@ -87,5 +87,61 @@ namespace Lucene.Net.Index.Sorter
             reader = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(dir));
             assertFalse("index should not have deletions", reader.HasDeletions);
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestBinaryDocValuesField()
+        {
+            base.TestBinaryDocValuesField();
+        }
+
+        [Test]
+        public override void TestDocsAndPositionsEnum()
+        {
+            base.TestDocsAndPositionsEnum();
+        }
+
+        [Test]
+        public override void TestDocsEnum()
+        {
+            base.TestDocsEnum();
+        }
+
+        [Test]
+        public override void TestNormValues()
+        {
+            base.TestNormValues();
+        }
+
+        [Test]
+        public override void TestNumericDocValuesField()
+        {
+            base.TestNumericDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedDocValuesField()
+        {
+            base.TestSortedDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedSetDocValuesField()
+        {
+            base.TestSortedSetDocValuesField();
+        }
+
+        [Test]
+        public override void TestTermVectors()
+        {
+            base.TestTermVectors();
+        }
+
+        #endregion
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
index 2cff135..99623ad 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
@@ -230,7 +230,7 @@ namespace Lucene.Net.Index.Sorter
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBinaryDocValuesField()
         {
             BinaryDocValues dv = reader.GetBinaryDocValues(BINARY_DV_FIELD);
@@ -242,7 +242,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndPositionsEnum()
         {
             TermsEnum termsEnum = reader.Terms(DOC_POSITIONS_FIELD).Iterator(null);
@@ -322,7 +322,7 @@ namespace Lucene.Net.Index.Sorter
             return bits;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsEnum()
         {
             Bits mappedLiveDocs = RandomLiveDocs(reader.MaxDoc);
@@ -369,7 +369,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNormValues()
         {
             NumericDocValues dv = reader.GetNormValues(NORMS_FIELD);
@@ -380,7 +380,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNumericDocValuesField()
         {
             NumericDocValues dv = reader.GetNumericDocValues(NUMERIC_DV_FIELD);
@@ -391,7 +391,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedDocValuesField()
         {
             SortedDocValues dv = reader.GetSortedDocValues(SORTED_DV_FIELD);
@@ -404,7 +404,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetDocValuesField()
         {
             AssumeTrue("default codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -423,7 +423,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTermVectors()
         {
             int maxDoc = reader.MaxDoc;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
index cb2b38e..93b234a 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
@@ -79,5 +79,61 @@ namespace Lucene.Net.Index.Sorter
                 assertEquals("Cannot sort an index with a Sort that refers to the relevance score", e.Message);
             }
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestBinaryDocValuesField()
+        {
+            base.TestBinaryDocValuesField();
+        }
+
+        [Test]
+        public override void TestDocsAndPositionsEnum()
+        {
+            base.TestDocsAndPositionsEnum();
+        }
+
+        [Test]
+        public override void TestDocsEnum()
+        {
+            base.TestDocsEnum();
+        }
+
+        [Test]
+        public override void TestNormValues()
+        {
+            base.TestNormValues();
+        }
+
+        [Test]
+        public override void TestNumericDocValuesField()
+        {
+            base.TestNumericDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedDocValuesField()
+        {
+            base.TestSortedDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedSetDocValuesField()
+        {
+            base.TestSortedSetDocValuesField();
+        }
+
+        [Test]
+        public override void TestTermVectors()
+        {
+            base.TestTermVectors();
+        }
+
+        #endregion
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
index 2b71216..577f27b 100644
--- a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
@@ -551,5 +551,255 @@ namespace Lucene.Net.QueryParsers.Classic
             assertEquals(expected, qp.Parse("\"\u4e2d\u56fd\"~3^2"));
         }
 
+
+        #region QueryParserTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestCJK()
+        {
+            base.TestCJK();
+        }
+
+        [Test]
+        public override void TestCJKTerm()
+        {
+            base.TestCJKTerm();
+        }
+
+        [Test]
+        public override void TestCJKBoostedTerm()
+        {
+            base.TestCJKBoostedTerm();
+        }
+
+        [Test]
+        public override void TestCJKPhrase()
+        {
+            base.TestCJKPhrase();
+        }
+
+        [Test]
+        public override void TestCJKBoostedPhrase()
+        {
+            base.TestCJKBoostedPhrase();
+        }
+
+        [Test]
+        public override void TestCJKSloppyPhrase()
+        {
+            base.TestCJKSloppyPhrase();
+        }
+
+        [Test]
+        public override void TestAutoGeneratePhraseQueriesOn()
+        {
+            base.TestAutoGeneratePhraseQueriesOn();
+        }
+
+        [Test]
+        public override void TestSimple()
+        {
+            base.TestSimple();
+        }
+
+        [Test]
+        public override void TestOperatorVsWhitespace()
+        {
+            base.TestOperatorVsWhitespace();
+        }
+
+        [Test]
+        public override void TestPunct()
+        {
+            base.TestPunct();
+        }
+
+        [Test]
+        public override void TestSlop()
+        {
+            base.TestSlop();
+        }
+
+        [Test]
+        public override void TestNumber()
+        {
+            base.TestNumber();
+        }
+
+        [Test]
+        public override void TestWildcard()
+        {
+            base.TestWildcard();
+        }
+
+        [Test]
+        public override void TestLeadingWildcardType()
+        {
+            base.TestLeadingWildcardType();
+        }
+
+        [Test]
+        public override void TestQPA()
+        {
+            base.TestQPA();
+        }
+
+        [Test]
+        public override void TestRange()
+        {
+            base.TestRange();
+        }
+
+        [Test]
+        public override void TestRangeWithPhrase()
+        {
+            base.TestRangeWithPhrase();
+        }
+
+        [Test]
+        public override void TestDateRange()
+        {
+            base.TestDateRange();
+        }
+
+        [Test]
+        public override void TestEscaped()
+        {
+            base.TestEscaped();
+        }
+
+        [Test]
+        public override void TestEscapedVsQuestionMarkAsWildcard()
+        {
+            base.TestEscapedVsQuestionMarkAsWildcard();
+        }
+
+        [Test]
+        public override void TestQueryStringEscaping()
+        {
+            base.TestQueryStringEscaping();
+        }
+
+        [Test]
+        public override void TestTabNewlineCarriageReturn()
+        {
+            base.TestTabNewlineCarriageReturn();
+        }
+
+        [Test]
+        public override void TestSimpleDAO()
+        {
+            base.TestSimpleDAO();
+        }
+
+        [Test]
+        public override void TestBoost()
+        {
+            base.TestBoost();
+        }
+
+        [Test]
+        public override void TestException()
+        {
+            base.TestException();
+        }
+
+        [Test]
+        public override void TestBooleanQuery()
+        {
+            base.TestBooleanQuery();
+        }
+
+        [Test]
+        public override void TestPrecedence()
+        {
+            base.TestPrecedence();
+        }
+
+        [Test]
+        public override void TestEscapedWildcard()
+        {
+            base.TestEscapedWildcard();
+        }
+
+        [Test]
+        public override void TestRegexps()
+        {
+            base.TestRegexps();
+        }
+
+        [Test]
+        public override void TestStopwords()
+        {
+            base.TestStopwords();
+        }
+
+        [Test]
+        public override void TestPositionIncrement()
+        {
+            base.TestPositionIncrement();
+        }
+
+        [Test]
+        public override void TestMatchAllDocs()
+        {
+            base.TestMatchAllDocs();
+        }
+
+        // LUCENE-2002: make sure defaults for StandardAnalyzer's
+        // enableStopPositionIncr & QueryParser's enablePosIncr
+        // "match"
+        [Test]
+        public override void TestPositionIncrements()
+        {
+            base.TestPositionIncrements();
+        }
+
+        [Test]
+        public override void TestCollatedRange()
+        {
+            base.TestCollatedRange();
+        }
+
+        [Test]
+        public override void TestDistanceAsEditsParsing()
+        {
+            base.TestDistanceAsEditsParsing();
+        }
+
+        [Test]
+        public override void TestPhraseQueryToString()
+        {
+            base.TestPhraseQueryToString();
+        }
+
+        [Test]
+        public override void TestParseWildcardAndPhraseQueries()
+        {
+            base.TestParseWildcardAndPhraseQueries();
+        }
+
+        [Test]
+        public override void TestPhraseQueryPositionIncrements()
+        {
+            base.TestPhraseQueryPositionIncrements();
+        }
+
+        [Test]
+        public override void TestMatchAllQueryParsing()
+        {
+            base.TestMatchAllQueryParsing();
+        }
+
+        [Test]
+        public override void TestNestedAndClausesFoo()
+        {
+            base.TestNestedAndClausesFoo();
+        }
+
+        #endregion
     }
 }


[19/50] [abbrv] lucenenet git commit: Removed unnecessary byte[] cast from Core.Store.SimpleFSDirectory.ReadInternal()

Posted by ni...@apache.org.
Removed unnecessary byte[] cast from Core.Store.SimpleFSDirectory.ReadInternal()


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

Branch: refs/heads/master
Commit: 35bc49991869dc0f6ca8e726414e078c91da456d
Parents: 78614ee
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 17 21:54:18 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:56 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/SimpleFSDirectory.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/35bc4999/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs b/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
index e18a3bd..ff8015a 100644
--- a/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
@@ -197,7 +197,7 @@ namespace Lucene.Net.Store
                         while (total < len)
                         {
                             int toRead = Math.Min(CHUNK_SIZE, len - total);
-                            int i = File.Read((byte[])(Array)b, offset + total, toRead);
+                            int i = File.Read(b, offset + total, toRead);
                             if (i < 0) // be defensive here, even though we checked before hand, something could have changed
                             {
                                 throw new EndOfStreamException("read past EOF: " + this + " off: " + offset + " len: " + len + " total: " + total + " chunkLen: " + toRead + " end: " + End);


[28/50] [abbrv] lucenenet git commit: Fixed bugs in Core.Store.MMapDirectory that were causing false access denied exceptions when reaching the end of the file.

Posted by ni...@apache.org.
Fixed bugs in Core.Store.MMapDirectory that were causing false access denied exceptions when reaching the end of the file.


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

Branch: refs/heads/master
Commit: 3318a4d2601cb0f655786ee34bccba7371a1dc71
Parents: 302c7ad
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Oct 19 10:08:13 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:59 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/MMapDirectory.cs | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3318a4d2/src/Lucene.Net.Core/Store/MMapDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/MMapDirectory.cs b/src/Lucene.Net.Core/Store/MMapDirectory.cs
index 4b8ec4b..1276e5e 100644
--- a/src/Lucene.Net.Core/Store/MMapDirectory.cs
+++ b/src/Lucene.Net.Core/Store/MMapDirectory.cs
@@ -348,18 +348,27 @@ namespace Lucene.Net.Store
                                                         HandleInheritability inheritability, bool leaveOpen)
              */
 
+            long fileCapacity = length == 0 ? ushort.MaxValue : length;
+
             if (input.memoryMappedFile == null)
             {
-                input.memoryMappedFile = MemoryMappedFile.CreateFromFile(fc, null, length == 0 ? 1024 : length, MemoryMappedFileAccess.ReadWrite, null, HandleInheritability.Inheritable, false);
+                input.memoryMappedFile = MemoryMappedFile.CreateFromFile(fc, null, fileCapacity, MemoryMappedFileAccess.ReadWrite, null, HandleInheritability.Inheritable, false);
             }
 
             long bufferStart = 0L;
             for (int bufNr = 0; bufNr < nrBuffers; bufNr++)
             {
                 int bufSize = (int)((length > (bufferStart + chunkSize)) ? chunkSize : (length - bufferStart));
-                //LUCENE TO-DO
-                buffers[bufNr] = new MemoryMappedFileByteBuffer(input.memoryMappedFile.CreateViewAccessor(offset + bufferStart, bufSize, MemoryMappedFileAccess.Read), -1, 0, bufSize, bufSize);
-                //buffers[bufNr] = fc.Map(FileStream.MapMode.READ_ONLY, offset + bufferStart, bufSize);
+
+                // LUCENENET: We get a file access exception if we create a 0 byte file at the end of the range.
+                // We can fix this by moving back 1 byte if the bufSize is 0.
+                int adjust = 0;
+                if (bufSize == 0 && bufNr == (nrBuffers - 1) && (offset + bufferStart) > 0)
+                {
+                    adjust = 1;
+                }
+
+                buffers[bufNr] = new MemoryMappedFileByteBuffer(input.memoryMappedFile.CreateViewAccessor((offset + bufferStart) - adjust, bufSize, MemoryMappedFileAccess.Read), -1, 0, bufSize, bufSize);
                 bufferStart += bufSize;
             }
 


[21/50] [abbrv] lucenenet git commit: Removed unnecessary cast from Core.Store.NIOFSDirectory

Posted by ni...@apache.org.
Removed unnecessary cast from Core.Store.NIOFSDirectory


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

Branch: refs/heads/master
Commit: 2fc1ad279d6c0b3ecfc5f95e9000e667823bea0b
Parents: d7bbc4a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Oct 19 05:29:17 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:57 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/NIOFSDirectory.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2fc1ad27/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/NIOFSDirectory.cs b/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
index e2a0a95..bcc63f3 100644
--- a/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
@@ -216,7 +216,7 @@ namespace Lucene.Net.Store
                 }
                 else
                 {
-                    bb = ByteBuffer.Wrap((byte[])(Array)b, offset, len);
+                    bb = ByteBuffer.Wrap(b, offset, len);
                 }
 
                 int readOffset = bb.Position;


[49/50] [abbrv] lucenenet git commit: Ported Analysis.Stempel + tests (closes #190)

Posted by ni...@apache.org.
Ported Analysis.Stempel + tests (closes #190)


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

Branch: refs/heads/master
Commit: 2952508699645b571a2b960afaedc725252e168c
Parents: 4dbc359
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 2 21:37:26 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 23 19:44:24 2016 +0700

----------------------------------------------------------------------
 Lucene.Net.sln                                  |  28 ++
 .../Egothor.Stemmer/Cell.cs                     | 105 +++++
 .../Egothor.Stemmer/Compile.cs                  | 222 +++++++++
 .../Egothor.Stemmer/Diff.cs                     | 332 +++++++++++++
 .../Egothor.Stemmer/DiffIt.cs                   | 144 ++++++
 .../Egothor.Stemmer/Gener.cs                    | 139 ++++++
 .../Egothor.Stemmer/Lift.cs                     | 165 +++++++
 .../Egothor.Stemmer/MultiTrie.cs                | 213 +++++++++
 .../Egothor.Stemmer/MultiTrie2.cs               | 421 +++++++++++++++++
 .../Egothor.Stemmer/Optimizer.cs                | 227 +++++++++
 .../Egothor.Stemmer/Optimizer2.cs               |  92 ++++
 .../Egothor.Stemmer/Reduce.cs                   | 143 ++++++
 .../Egothor.Stemmer/Row.cs                      | 342 ++++++++++++++
 .../Egothor.Stemmer/Trie.cs                     | 472 +++++++++++++++++++
 .../Lucene.Net.Analysis.Stempel.csproj          |  87 ++++
 .../Pl/PolishAnalyzer.cs                        | 164 +++++++
 .../Pl/stemmer_20000.tbl                        | Bin 0 -> 2225192 bytes
 .../Pl/stopwords.txt                            | 186 ++++++++
 .../Properties/AssemblyInfo.cs                  |  39 ++
 .../RectangularArrays.cs                        |  52 ++
 .../Stempel/StempelFilter.cs                    |  91 ++++
 .../Stempel/StempelPolishStemFilterFactory.cs   |  48 ++
 .../Stempel/StempelStemmer.cs                   | 105 +++++
 src/Lucene.Net.Core/Lucene.Net.csproj           |   4 +
 src/Lucene.Net.Core/Support/DataInputStream.cs  | 323 +++++++++++++
 src/Lucene.Net.Core/Support/DataOutputStream.cs | 256 ++++++++++
 src/Lucene.Net.Core/Support/IDataInput.cs       |  24 +
 src/Lucene.Net.Core/Support/IDataOutput.cs      |  23 +
 .../Egothor.Stemmer/TestCompile.cs              | 211 +++++++++
 .../Egothor.Stemmer/TestStemmer.cs              | 191 ++++++++
 .../Egothor.Stemmer/testRules.txt               |   4 +
 .../Lucene.Net.Tests.Analysis.Stempel.csproj    |  89 ++++
 .../Pl/TestPolishAnalyzer.cs                    | 102 ++++
 .../Properties/AssemblyInfo.cs                  |  36 ++
 .../TestStempelPolishStemFilterFactory.cs       |  56 +++
 .../packages.config                             |   4 +
 36 files changed, 5140 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/Lucene.Net.sln
----------------------------------------------------------------------
diff --git a/Lucene.Net.sln b/Lucene.Net.sln
index 0322498..c87a7be 100644
--- a/Lucene.Net.sln
+++ b/Lucene.Net.sln
@@ -64,6 +64,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Memory", "src\Lu
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Tests.Memory", "src\Lucene.Net.Tests.Memory\Lucene.Net.Tests.Memory.csproj", "{7F9378BF-C88D-46FF-9AE8-5E7D8C0225D3}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Analysis.Stempel", "src\Lucene.Net.Analysis.Stempel\Lucene.Net.Analysis.Stempel.csproj", "{A76DAD88-E3A5-40F9-9114-FACD77BD8265}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Tests.Analysis.Stempel", "src\Lucene.Net.Tests.Analysis.Stempel\Lucene.Net.Tests.Analysis.Stempel.csproj", "{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -355,6 +359,30 @@ Global
 		{7F9378BF-C88D-46FF-9AE8-5E7D8C0225D3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{7F9378BF-C88D-46FF-9AE8-5E7D8C0225D3}.Release|x86.ActiveCfg = Release|Any CPU
 		{7F9378BF-C88D-46FF-9AE8-5E7D8C0225D3}.Release|x86.Build.0 = Release|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Debug|x86.Build.0 = Debug|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Release|x86.ActiveCfg = Release|Any CPU
+		{A76DAD88-E3A5-40F9-9114-FACD77BD8265}.Release|x86.Build.0 = Release|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Debug|x86.Build.0 = Debug|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Release|x86.ActiveCfg = Release|Any CPU
+		{940A6AB1-F00A-40E2-BC1A-2898EFA8C48F}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Cell.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Cell.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Cell.cs
new file mode 100644
index 0000000..b1fa11c
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Cell.cs
@@ -0,0 +1,105 @@
+\ufeff/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// A <see cref="Cell"/> is a portion of a <see cref="Trie"/>.
+    /// </summary>
+    public class Cell
+    {
+        /// <summary>
+        /// next row id in this way
+        /// </summary>
+        internal int @ref = -1;
+        /// <summary>
+        /// command of the cell
+        /// </summary>
+        internal int cmd = -1;
+        /// <summary>
+        /// how many cmd-s was in subtrie before Pack()
+        /// </summary>
+        internal int cnt = 0;
+        /// <summary>
+        /// how many chars would be discarded from input key in this way
+        /// </summary>
+        internal int skip = 0;
+
+        /// <summary>
+        /// Constructor for the <see cref="Cell"/> object.
+        /// </summary>
+        internal Cell() { }
+
+        /// <summary>
+        /// Construct a <see cref="Cell"/> using the properties of the given <see cref="Cell"/>.
+        /// </summary>
+        /// <param name="a">the <see cref="Cell"/> whose properties will be used</param>
+        internal Cell(Cell a)
+        {
+            @ref = a.@ref;
+            cmd = a.cmd;
+            cnt = a.cnt;
+            skip = a.skip;
+        }
+
+        /// <summary>
+        /// Return a string containing this <see cref="Cell"/>'s attributes.
+        /// </summary>
+        /// <returns>a string representation of this <see cref="Cell"/></returns>
+        public override string ToString()
+        {
+            return "ref(" + @ref +")cmd(" + cmd + ")cnt(" + cnt + ")skp(" + skip + ")";
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs
new file mode 100644
index 0000000..20cb46a
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs
@@ -0,0 +1,222 @@
+\ufeffusing Lucene.Net.Support;
+using System;
+using System.IO;
+using System.Text;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The Compile class is used to compile a stemmer table.
+    /// </summary>
+    public class Compile
+    {
+        static bool backward;
+        static bool multi;
+        static Trie trie;
+
+        /// <summary>
+        /// no instantiation
+        /// </summary>
+        private Compile() { }
+
+        /**
+         * Entry point to the Compile application.
+         * <p>
+         * This program takes any number of arguments: the first is the name of the
+         * desired stemming algorithm to use (a list is available in the package
+         * description) , all of the rest should be the path or paths to a file or
+         * files containing a stemmer table to compile.
+         * 
+         * @param args the command line arguments
+         */
+        public static void Main(string[] args)
+        {
+            if (args.Length < 1)
+            {
+                return;
+            }
+
+            args[0].ToUpperInvariant();
+
+            backward = args[0][0] == '-';
+            int qq = (backward) ? 1 : 0;
+            bool storeorig = false;
+
+            if (args[0][qq] == '0')
+            {
+                storeorig = true;
+                qq++;
+            }
+
+            multi = args[0][qq] == 'M';
+            if (multi)
+            {
+                qq++;
+            }
+
+            // LUCENENET TODO: Is this any different than Encoding.UTF8?
+            //String charset = System.getProperty("egothor.stemmer.charset", "UTF-8");
+
+            char[] optimizer = new char[args[0].Length - qq];
+            for (int i = 0; i < optimizer.Length; i++)
+            {
+                optimizer[i] = args[0][qq + i];
+            }
+
+            for (int i = 1; i < args.Length; i++)
+            {
+                TextReader @in;
+                // System.out.println("[" + args[i] + "]");
+                Diff diff = new Diff();
+                //int stems = 0; // not used
+                int words = 0;
+
+
+                AllocTrie();
+
+                Console.WriteLine(args[i]);
+                using (@in = new StreamReader(
+                    new FileStream(args[i], FileMode.Open, FileAccess.Read), Encoding.UTF8))
+                {
+                    for (string line = @in.ReadLine(); line != null; line = @in.ReadLine())
+                    {
+                        try
+                        {
+                            line = line.ToLowerInvariant();
+                            StringTokenizer st = new StringTokenizer(line);
+                            string stem = st.NextToken();
+                            if (storeorig)
+                            {
+                                trie.Add(stem, "-a");
+                                words++;
+                            }
+                            while (st.HasMoreTokens())
+                            {
+                                string token = st.NextToken();
+                                if (token.Equals(stem) == false)
+                                {
+                                    trie.Add(token, diff.Exec(token, stem));
+                                    words++;
+                                }
+                            }
+                        }
+                        catch (InvalidOperationException /*x*/)
+                        {
+                            // no base token (stem) on a line
+                        }
+                    }
+                }
+
+                Optimizer o = new Optimizer();
+                Optimizer2 o2 = new Optimizer2();
+                Lift l = new Lift(true);
+                Lift e = new Lift(false);
+                Gener g = new Gener();
+
+                for (int j = 0; j < optimizer.Length; j++)
+                {
+                    string prefix;
+                    switch (optimizer[j])
+                    {
+                        case 'G':
+                            trie = trie.Reduce(g);
+                            prefix = "G: ";
+                            break;
+                        case 'L':
+                            trie = trie.Reduce(l);
+                            prefix = "L: ";
+                            break;
+                        case 'E':
+                            trie = trie.Reduce(e);
+                            prefix = "E: ";
+                            break;
+                        case '2':
+                            trie = trie.Reduce(o2);
+                            prefix = "2: ";
+                            break;
+                        case '1':
+                            trie = trie.Reduce(o);
+                            prefix = "1: ";
+                            break;
+                        default:
+                            continue;
+                    }
+                    trie.PrintInfo(System.Console.Out, prefix + " ");
+                }
+
+                using (DataOutputStream os = new DataOutputStream(
+                    new FileStream(args[i] + ".out", FileMode.OpenOrCreate, FileAccess.Write)))
+                {
+                    os.WriteUTF(args[0]);
+                    trie.Store(os);
+                }
+            }
+        }
+
+        internal static void AllocTrie()
+        {
+            if (multi)
+            {
+                trie = new MultiTrie2(!backward);
+            }
+            else
+            {
+                trie = new Trie(!backward);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Diff.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Diff.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Diff.cs
new file mode 100644
index 0000000..e5e372e
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Diff.cs
@@ -0,0 +1,332 @@
+\ufeffusing System;
+using System.Text;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The Diff object generates a patch string.
+    /// <para>
+    /// A patch string is actually a command to a stemmer telling it how to reduce a
+    /// word to its root. For example, to reduce the word teacher to its root teach
+    /// the patch string Db would be generated. This command tells the stemmer to
+    /// delete the last 2 characters from the word teacher to reach the stem (the
+    /// patch commands are applied starting from the last character in order to save
+    /// </para>
+    /// </summary>
+    public class Diff
+    {
+        int sizex = 0;
+        int sizey = 0;
+        int[][] net;
+        int[][] way;
+
+        int INSERT;
+        int DELETE;
+        int REPLACE;
+        int NOOP;
+
+        /// <summary>
+        /// Constructor for the Diff object.
+        /// </summary>
+        public Diff()
+            : this(1, 1, 1, 0)
+        {
+        }
+
+        /// <summary>
+        /// Constructor for the Diff object
+        /// </summary>
+        /// <param name="ins">Description of the Parameter</param>
+        /// <param name="del">Description of the Parameter</param>
+        /// <param name="rep">Description of the Parameter</param>
+        /// <param name="noop">Description of the Parameter</param>
+        public Diff(int ins, int del, int rep, int noop)
+        {
+            INSERT = ins;
+            DELETE = del;
+            REPLACE = rep;
+            NOOP = noop;
+        }
+
+        /// <summary>
+        /// Apply the given patch string <paramref name="diff"/> to the given string
+        /// <paramref name="dest"/>
+        /// </summary>
+        /// <param name="dest">Destination string</param>
+        /// <param name="diff">Patch string</param>
+        public static void Apply(StringBuilder dest, string diff)
+        {
+            try
+            {
+
+                if (diff == null)
+                {
+                    return;
+                }
+
+                int pos = dest.Length - 1;
+                if (pos < 0)
+                {
+                    return;
+                }
+                // orig == ""
+                for (int i = 0; i < diff.Length / 2; i++)
+                {
+                    char cmd = diff[2 * i];
+                    char param = diff[2 * i + 1];
+                    int par_num = (param - 'a' + 1);
+                    switch (cmd)
+                    {
+                        case '-':
+                            pos = pos - par_num + 1;
+                            break;
+                        case 'R':
+                            dest[pos] = param;
+                            break;
+                        case 'D':
+                            int o = pos;
+                            pos -= par_num - 1;
+                            /*
+                             * delete par_num chars from index pos
+                             */
+                            // String s = orig.toString();
+                            // s = s.substring( 0, pos ) + s.substring( o + 1 );
+                            // orig = new StringBuffer( s );
+                            dest.Remove(pos, (o + 1) - pos);
+                            break;
+                        case 'I':
+                            dest.Insert(pos += 1, param);
+                            break;
+                    }
+                    pos--;
+                }
+            }
+            catch (IndexOutOfRangeException /*x*/)
+            {
+                // x.printStackTrace();
+            }
+            catch (ArgumentOutOfRangeException /*x*/)
+            {
+                // x.printStackTrace();
+            }
+        }
+
+        /// <summary>
+        /// Construct a patch string that transforms a to b.
+        /// </summary>
+        /// <param name="a">1st string</param>
+        /// <param name="b">2nd string</param>
+        /// <returns></returns>
+        public string Exec(string a, string b)
+        {
+            if (a == null || b == null)
+            {
+                return null;
+            }
+
+            int x;
+            int y;
+            int maxx;
+            int maxy;
+            int[] go = new int[4];
+            const int X = 1;
+            const int Y = 2;
+            const int R = 3;
+            const int D = 0;
+
+            /*
+             * setup memory if needed => processing speed up
+             */
+            maxx = a.Length + 1;
+            maxy = b.Length + 1;
+            if ((maxx >= sizex) || (maxy >= sizey))
+            {
+                sizex = maxx + 8;
+                sizey = maxy + 8;
+                net = RectangularArrays.ReturnRectangularIntArray(sizex, sizey);
+                way = RectangularArrays.ReturnRectangularIntArray(sizex, sizey);
+            }
+
+            /*
+             * clear the network
+             */
+            for (x = 0; x < maxx; x++)
+            {
+                for (y = 0; y < maxy; y++)
+                {
+                    net[x][y] = 0;
+                }
+            }
+
+            /*
+             * set known persistent values
+             */
+            for (x = 1; x < maxx; x++)
+            {
+                net[x][0] = x;
+                way[x][0] = X;
+            }
+            for (y = 1; y < maxy; y++)
+            {
+                net[0][y] = y;
+                way[0][y] = Y;
+            }
+
+            for (x = 1; x < maxx; x++)
+            {
+                for (y = 1; y < maxy; y++)
+                {
+                    go[X] = net[x - 1][y] + DELETE;
+                    // way on x costs 1 unit
+                    go[Y] = net[x][y - 1] + INSERT;
+                    // way on y costs 1 unit
+                    go[R] = net[x - 1][y - 1] + REPLACE;
+                    go[D] = net[x - 1][y - 1]
+                        + ((a[x - 1] == b[y - 1]) ? NOOP : 100);
+                    // diagonal costs 0, when no change
+                    ushort min = (ushort)D;
+                    if (go[min] >= go[X])
+                    {
+                        min = (ushort)X;
+                    }
+                    if (go[min] > go[Y])
+                    {
+                        min = (ushort)Y;
+                    }
+                    if (go[min] > go[R])
+                    {
+                        min = (ushort)R;
+                    }
+                    way[x][y] = min;
+                    net[x][y] = (ushort)go[min];
+                }
+            }
+
+            // read the patch string
+            StringBuilder result = new StringBuilder();
+            char @base = (char)('a' - 1);
+            char deletes = @base;
+            char equals = @base;
+            for (x = maxx - 1, y = maxy - 1; x + y != 0;)
+            {
+                switch (way[x][y])
+                {
+                    case X:
+                        if (equals != @base)
+                        {
+                            result.Append("-" + (equals));
+                            equals = @base;
+                        }
+                        deletes++;
+                        x--;
+                        break;
+                    // delete
+                    case Y:
+                        if (deletes != @base)
+                        {
+                            result.Append("D" + (deletes));
+                            deletes = @base;
+                        }
+                        if (equals != @base)
+                        {
+                            result.Append("-" + (equals));
+                            equals = @base;
+                        }
+                        result.Append('I');
+                        result.Append(b[--y]);
+                        break;
+                    // insert
+                    case R:
+                        if (deletes != @base)
+                        {
+                            result.Append("D" + (deletes));
+                            deletes = @base;
+                        }
+                        if (equals != @base)
+                        {
+                            result.Append("-" + (equals));
+                            equals = @base;
+                        }
+                        result.Append('R');
+                        result.Append(b[--y]);
+                        x--;
+                        break;
+                    // replace
+                    case D:
+                        if (deletes != @base)
+                        {
+                            result.Append("D" + (deletes));
+                            deletes = @base;
+                        }
+                        equals++;
+                        x--;
+                        y--;
+                        break;
+                        // no change
+                }
+            }
+            if (deletes != @base)
+            {
+                result.Append("D" + (deletes));
+                deletes = @base;
+            }
+
+            return result.ToString();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs
new file mode 100644
index 0000000..01621bf
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs
@@ -0,0 +1,144 @@
+\ufeffusing Lucene.Net.Support;
+using System;
+using System.IO;
+using System.Text;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The DiffIt class is a means generate patch commands from an already prepared
+    /// stemmer table.
+    /// </summary>
+    public class DiffIt
+    {
+        /// <summary>
+        /// no instantiation
+        /// </summary>
+        private DiffIt() { }
+
+        internal static int Get(int i, string s)
+        {
+            int result;
+            if (!int.TryParse(s.Substring(i, 1), out result))
+            {
+                return 1;
+            }
+
+            return result;
+            //try
+            //{
+            //    return int.parseInt(s.substring(i, i + 1));
+            //}
+            //catch (Exception /*x*/)
+            //{
+            //    return 1;
+            //}
+        }
+
+        /// <summary>
+        /// Entry point to the DiffIt application.
+        /// <para>
+        /// This application takes one argument, the path to a file containing a
+        /// stemmer table. The program reads the file and generates the patch commands
+        /// for the stems.
+        /// </para>
+        /// </summary>
+        /// <param name="args">the path to a file containing a stemmer table</param>
+        public static void Main(string[] args)
+        {
+
+
+            int ins = Get(0, args[0]);
+            int del = Get(1, args[0]);
+            int rep = Get(2, args[0]);
+            int nop = Get(3, args[0]);
+
+            for (int i = 1; i < args.Length; i++)
+            {
+                TextReader @in;
+                // System.out.println("[" + args[i] + "]");
+                Diff diff = new Diff(ins, del, rep, nop);
+                // LUCENENET TODO: Is using Encoding.UTF8 good enough?
+                //String charset = System.getProperty("egothor.stemmer.charset", "UTF-8");
+                @in = new StreamReader(new FileStream(args[i], FileMode.Open, FileAccess.Read), Encoding.UTF8);
+                for (string line = @in.ReadLine(); line != null; line = @in.ReadLine())
+                {
+                    try
+                    {
+                        line = line.ToLowerInvariant();
+                        StringTokenizer st = new StringTokenizer(line);
+                        string stem = st.NextToken();
+                        Console.WriteLine(stem + " -a");
+                        while (st.HasMoreTokens())
+                        {
+                            String token = st.NextToken();
+                            if (token.Equals(stem) == false)
+                            {
+                                Console.WriteLine(stem + " " + diff.Exec(token, stem));
+                            }
+                        }
+                    }
+                    catch (InvalidOperationException /*x*/)
+                    {
+                        // no base token (stem) on a line
+                    }
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Gener.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Gener.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Gener.cs
new file mode 100644
index 0000000..bacfc68
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Gener.cs
@@ -0,0 +1,139 @@
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The Gener object helps in the discarding of nodes which break the reduction
+    /// effort and defend the structure against large reductions.
+    /// </summary>
+    public class Gener : Reduce
+    {
+        /// <summary>
+        /// Constructor for the Gener object.
+        /// </summary>
+        public Gener() { }
+
+        /// <summary>
+        /// Return a Trie with infrequent values occurring in the given Trie removed.
+        /// </summary>
+        /// <param name="orig">the Trie to optimize</param>
+        /// <returns>a new optimized Trie</returns>
+        public override Trie Optimize(Trie orig)
+        {
+            IList<string> cmds = orig.cmds;
+            IList<Row> rows = new List<Row>();
+            IList<Row> orows = orig.rows;
+            int[] remap = new int[orows.Count];
+
+            Arrays.Fill(remap, 1);
+            for (int j = orows.Count - 1; j >= 0; j--)
+            {
+                if (Eat(orows[j], remap))
+                {
+                    remap[j] = 0;
+                }
+            }
+
+            Arrays.Fill(remap, -1);
+            rows = RemoveGaps(orig.root, orows, new List<Row>(), remap);
+
+            return new Trie(orig.forward, remap[orig.root], cmds, rows);
+        }
+
+        /// <summary>
+        /// Test whether the given Row of Cells in a Trie should be included in an
+        /// optimized Trie.
+        /// </summary>
+        /// <param name="in">the Row to test</param>
+        /// <param name="remap">Description of the Parameter</param>
+        /// <returns><c>true</c> if the Row should remain; otherwise, <c>false</c></returns>
+        public bool Eat(Row @in, int[] remap)
+        {
+            int sum = 0;
+            for (IEnumerator<Cell> i = @in.cells.Values.GetEnumerator(); i.MoveNext();)
+            {
+                Cell c = i.Current;
+                sum += c.cnt;
+                if (c.@ref >= 0)
+                {
+                    if (remap[c.@ref] == 0)
+                    {
+                        c.@ref = -1;
+                    }
+                }
+            }
+            int frame = sum / 10;
+            bool live = false;
+            for (IEnumerator<Cell> i = @in.cells.Values.GetEnumerator(); i.MoveNext();)
+            {
+                Cell c = i.Current;
+                if (c.cnt < frame && c.cmd >= 0)
+                {
+                    c.cnt = 0;
+                    c.cmd = -1;
+                }
+                if (c.cmd >= 0 || c.@ref >= 0)
+                {
+                    live |= true;
+                }
+            }
+            return !live;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Lift.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Lift.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Lift.cs
new file mode 100644
index 0000000..43a4602
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Lift.cs
@@ -0,0 +1,165 @@
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The Lift class is a data structure that is a variation of a Patricia trie.
+    /// <para>
+    /// Lift's <i>raison d'etre</i> is to implement reduction of the trie via the
+    /// Lift-Up method., which makes the data structure less liable to overstemming.
+    /// </para>
+    /// </summary>
+    public class Lift : Reduce
+    {
+        bool changeSkip;
+
+        /// <summary>
+        /// Constructor for the Lift object.
+        /// </summary>
+        /// <param name="changeSkip">
+        /// when set to <c>true</c>, comparison of two Cells takes
+        /// a skip command into account
+        /// </param>
+        public Lift(bool changeSkip)
+        {
+            this.changeSkip = changeSkip;
+        }
+
+        /// <summary>
+        /// Optimize (eliminate rows with no content) the given Trie and return the
+        /// reduced Trie.
+        /// </summary>
+        /// <param name="orig">the Trie to optimized</param>
+        /// <returns>the reduced Trie</returns>
+        public override Trie Optimize(Trie orig)
+        {
+            IList<string> cmds = orig.cmds;
+            IList<Row> rows = new List<Row>();
+            IList<Row> orows = orig.rows;
+            int[] remap = new int[orows.Count];
+
+            for (int j = orows.Count - 1; j >= 0; j--)
+            {
+                LiftUp(orows[j], orows);
+            }
+
+            Arrays.Fill(remap, -1);
+            rows = RemoveGaps(orig.root, orows, new List<Row>(), remap);
+
+            return new Trie(orig.forward, remap[orig.root], cmds, rows);
+        }
+
+        /// <summary>
+        /// Reduce the trie using Lift-Up reduction.
+        /// <para>
+        /// The Lift-Up reduction propagates all leaf-values (patch commands), where
+        /// possible, to higher levels which are closer to the root of the trie.
+        /// </para>
+        /// </summary>
+        /// <param name="in">the Row to consider when optimizing</param>
+        /// <param name="nodes">contains the patch commands</param>
+        public void LiftUp(Row @in, IList<Row> nodes)
+        {
+            IEnumerator<Cell> i = @in.cells.Values.GetEnumerator();
+            for (; i.MoveNext();)
+            {
+                Cell c = i.Current;
+                if (c.@ref >= 0)
+                {
+                    Row to = nodes[c.@ref];
+                    int sum = to.UniformCmd(changeSkip);
+                    if (sum >= 0)
+                    {
+                        if (sum == c.cmd)
+                        {
+                            if (changeSkip)
+                            {
+                                if (c.skip != to.uniformSkip + 1)
+                                {
+                                    continue;
+                                }
+                                c.skip = to.uniformSkip + 1;
+                            }
+                            else
+                            {
+                                c.skip = 0;
+                            }
+                            c.cnt += to.uniformCnt;
+                            c.@ref = -1;
+                        }
+                        else if (c.cmd < 0)
+                        {
+                            c.cnt = to.uniformCnt;
+                            c.cmd = sum;
+                            c.@ref = -1;
+                            if (changeSkip)
+                            {
+                                c.skip = to.uniformSkip + 1;
+                            }
+                            else
+                            {
+                                c.skip = 0;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
new file mode 100644
index 0000000..7bdad8f
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
@@ -0,0 +1,213 @@
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The <see cref="MultiTrie"/> is a <see cref="Trie"/> of <see cref="Trie"/>s. It stores words and their associated patch
+    /// commands. The <see cref="MultiTrie"/> handles patch commands individually (each command by
+    /// itself).
+    /// </summary>
+    public class MultiTrie : Trie
+    {
+        internal static char EOM = '*';
+        internal static string EOM_NODE = "" + EOM;
+
+        protected List<Trie> tries = new List<Trie>();
+
+        int BY = 1;
+
+        /// <summary>
+        /// Constructor for the <see cref="MultiTrie"/> object.
+        /// </summary>
+        /// <param name="is">the input stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public MultiTrie(IDataInput @is)
+            : base(false)
+        {
+            forward = @is.ReadBoolean();
+            BY = @is.ReadInt();
+            for (int i = @is.ReadInt(); i > 0; i--)
+            {
+                tries.Add(new Trie(@is));
+            }
+        }
+
+        /// <summary>
+        /// Constructor for the <see cref="MultiTrie"/> object
+        /// </summary>
+        /// <param name="forward">set to <c>true</c> if the elements should be read left to right</param>
+        public MultiTrie(bool forward)
+            : base(forward)
+        {
+        }
+
+        /// <summary>
+        /// Return the element that is stored in a cell associated with the given key.
+        /// </summary>
+        /// <param name="key">the key to the cell holding the desired element</param>
+        /// <returns>the element</returns>
+        public override string GetFully(string key)
+        {
+            StringBuilder result = new StringBuilder(tries.Count * 2);
+            for (int i = 0; i < tries.Count; i++)
+            {
+                string r = tries[i].GetFully(key);
+                if (r == null || (r.Length == 1 && r[0] == EOM))
+                {
+                    return result.ToString();
+                }
+                result.Append(r);
+            }
+            return result.ToString();
+        }
+
+        /// <summary>
+        /// Return the element that is stored as last on a path belonging to the given
+        /// key.
+        /// </summary>
+        /// <param name="key">the key associated with the desired element</param>
+        /// <returns>the element that is stored as last on a path</returns>
+        public override string GetLastOnPath(string key)
+        {
+            StringBuilder result = new StringBuilder(tries.Count * 2);
+            for (int i = 0; i < tries.Count; i++)
+            {
+                string r = tries[i].GetLastOnPath(key);
+                if (r == null || (r.Length == 1 && r[0] == EOM))
+                {
+                    return result.ToString();
+                }
+                result.Append(r);
+            }
+            return result.ToString();
+        }
+
+        /// <summary>
+        /// Write this data structure to the given output stream.
+        /// </summary>
+        /// <param name="os">the output stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public override void Store(IDataOutput os)
+        {
+            os.WriteBoolean(forward);
+            os.WriteInt(BY);
+            os.WriteInt(tries.Count);
+            foreach (Trie trie in tries)
+                trie.Store(os);
+        }
+
+        /// <summary>
+        /// Add an element to this structure consisting of the given key and patch
+        /// command.
+        /// <para>
+        /// This method will return without executing if the <paramref name="cmd"/>
+        /// parameter's length is 0.
+        /// </para>
+        /// </summary>
+        /// <param name="key">the key</param>
+        /// <param name="cmd">the patch command</param>
+        public override void Add(string key, string cmd)
+        {
+            if (cmd.Length == 0)
+            {
+                return;
+            }
+            int levels = cmd.Length / BY;
+            while (levels >= tries.Count)
+            {
+                tries.Add(new Trie(forward));
+            }
+            for (int i = 0; i < levels; i++)
+            {
+                tries[i].Add(key, cmd.Substring(BY * i, BY));
+            }
+            tries[levels].Add(key, EOM_NODE);
+        }
+
+        /// <summary>
+        /// Remove empty rows from the given <see cref="Trie"/> and return the newly reduced <see cref="Trie"/>.
+        /// </summary>
+        /// <param name="by">the <see cref="Trie"/> to reduce</param>
+        /// <returns>the newly reduced Trie</returns>
+        public override Trie Reduce(Reduce by)
+        {
+            List<Trie> h = new List<Trie>();
+            foreach (Trie trie in tries)
+                h.Add(trie.Reduce(by));
+
+            MultiTrie m = new MultiTrie(forward);
+            m.tries = h;
+            return m;
+        }
+
+        /// <summary>
+        /// Print the given prefix and the position(s) in the Trie where it appears.
+        /// </summary>
+        /// <param name="out"></param>
+        /// <param name="prefix">the desired prefix</param>
+        public override void PrintInfo(TextWriter @out, string prefix)
+        {
+            int c = 0;
+            foreach (Trie trie in tries)
+                trie.PrintInfo(@out, prefix + "[" + (++c) + "] ");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs
new file mode 100644
index 0000000..9db6b92
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs
@@ -0,0 +1,421 @@
+\ufeffusing Lucene.Net.Support;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The <see cref="MultiTrie"/> is a <see cref="Trie"/> of <see cref="Trie"/>s.
+    /// <para>
+    /// It stores words and their associated patch commands. The <see cref="MultiTrie"/> handles
+    /// patch commands broken into their constituent parts, as a <see cref="MultiTrie"/> does, but
+    /// the commands are delimited by the skip command.
+    /// </para>
+    /// </summary>
+    public class MultiTrie2 : MultiTrie
+    {
+        /// <summary>
+        /// Constructor for the <see cref="MultiTrie"/> object.
+        /// </summary>
+        /// <param name="is">the input stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public MultiTrie2(IDataInput @is)
+            : base(@is)
+        {
+        }
+
+        /// <summary>
+        /// Constructor for the <see cref="MultiTrie2"/> object
+        /// </summary>
+        /// <param name="forward">set to <c>true</c> if the elements should be read left to right</param>
+        public MultiTrie2(bool forward)
+            : base(forward)
+        {
+        }
+
+        /// <summary>
+        /// Return the element that is stored in a cell associated with the given key.
+        /// </summary>
+        /// <param name="key">the key to the cell holding the desired element</param>
+        /// <returns>the element</returns>
+        public override string GetFully(string key)
+        {
+            StringBuilder result = new StringBuilder(tries.Count * 2);
+            try
+            {
+                string lastkey = key;
+                string[] p = new string[tries.Count];
+                char lastch = ' ';
+                for (int i = 0; i < tries.Count; i++)
+                {
+                    string r = tries[i].GetFully(lastkey);
+                    if (r == null || (r.Length == 1 && r[0] == EOM))
+                    {
+                        return result.ToString();
+                    }
+                    if (CannotFollow(lastch, r[0]))
+                    {
+                        return result.ToString();
+                    }
+                    else
+                    {
+                        lastch = r[r.Length - 2];
+                    }
+                    // key=key.substring(lengthPP(r));
+                    p[i] = r;
+                    if (p[i][0] == '-')
+                    {
+                        if (i > 0)
+                        {
+                            if (!TrySkip(key, LengthPP(p[i - 1]), out key))
+                            {
+                                break;
+                            }
+                        }
+                        if (!TrySkip(key, LengthPP(p[i - 1]), out key))
+                        {
+                            break;
+                        }
+                    }
+                    // key = skip(key, lengthPP(r));
+                    result.Append(r);
+                    if (key.Length != 0)
+                    {
+                        lastkey = key;
+                    }
+                }
+            }
+            catch (ArgumentOutOfRangeException /*x*/) { }
+            return result.ToString();
+        }
+
+        /// <summary>
+        /// Return the element that is stored as last on a path belonging to the given
+        /// key.
+        /// </summary>
+        /// <param name="key">the key associated with the desired element</param>
+        /// <returns>the element that is stored as last on a path</returns>
+        public override string GetLastOnPath(string key)
+        {
+            StringBuilder result = new StringBuilder(tries.Count * 2);
+            try
+            {
+                string lastkey = key;
+                string[] p = new string[tries.Count];
+                char lastch = ' ';
+                for (int i = 0; i < tries.Count; i++)
+                {
+                    string r = tries[i].GetLastOnPath(lastkey);
+                    if (r == null || (r.Length == 1 && r[0] == EOM))
+                    {
+                        return result.ToString();
+                    }
+                    // System.err.println("LP:"+key+" last:"+lastch+" new:"+r);
+                    if (CannotFollow(lastch, r[0]))
+                    {
+                        return result.ToString();
+                    }
+                    else
+                    {
+                        lastch = r[r.Length - 2];
+                    }
+                    // key=key.substring(lengthPP(r));
+                    p[i] = r;
+                    if (p[i][0] == '-')
+                    {
+                        if (i > 0)
+                        {
+                            if (!TrySkip(key, LengthPP(p[i - 1]), out key))
+                            {
+                                break;
+                            }
+                        }
+                        if (!TrySkip(key, LengthPP(p[i]), out key))
+                        {
+                            break;
+                        }
+                    }
+                    // key = skip(key, lengthPP(r));
+                    result.Append(r);
+                    if (key.Length != 0)
+                    {
+                        lastkey = key;
+                    }
+                }
+            }
+            catch (ArgumentOutOfRangeException /*x*/) { }
+            return result.ToString();
+        }
+
+        /// <summary>
+        /// Write this data structure to the given output stream.
+        /// </summary>
+        /// <param name="os">the output stream</param>
+        /// <exception cref="IOException">if an I/O error occurs</exception>
+        public override void Store(IDataOutput os)
+        {
+            base.Store(os);
+        }
+
+        /// <summary>
+        /// Add an element to this structure consisting of the given key and patch
+        /// command.
+        /// <para>
+        /// This method will return without executing if the <paramref name="cmd"/>
+        /// parameter's length is 0.
+        /// </para>
+        /// </summary>
+        /// <param name="key">the key</param>
+        /// <param name="cmd">the patch command</param>
+        public override void Add(string key, string cmd)
+        {
+            if (cmd.Length == 0)
+            {
+                return;
+            }
+            // System.err.println( cmd );
+            string[] p = Decompose(cmd);
+            int levels = p.Length;
+            // System.err.println("levels "+key+" cmd "+cmd+"|"+levels);
+            while (levels >= tries.Count)
+            {
+                tries.Add(new Trie(forward));
+            }
+            string lastkey = key;
+            for (int i = 0; i < levels; i++)
+            {
+                if (key.Length > 0)
+                {
+                    tries[i].Add(key, p[i]);
+                    lastkey = key;
+                }
+                else
+                {
+                    tries[i].Add(lastkey, p[i]);
+                }
+                // System.err.println("-"+key+" "+p[i]+"|"+key.length());
+                /*
+                 * key=key.substring(lengthPP(p[i]));
+                 */
+                if (p[i].Length > 0 && p[i][0] == '-')
+                {
+                    if (i > 0)
+                    {
+                        if (!TrySkip(key, LengthPP(p[i - 1]), out key))
+                        {
+                            // LUCENENET: Should never happen, but since we don't
+                            // have a catch block here who knows what might happen if
+                            // we don't do this.
+                            throw new ArgumentOutOfRangeException();
+                        }
+                    }
+                    if (!TrySkip(key, LengthPP(p[i]), out key))
+                    {
+                        // LUCENENET: Should never happen, but since we don't
+                        // have a catch block here who knows what might happen if
+                        // we don't do this.
+                        throw new ArgumentOutOfRangeException();
+                    }
+                }
+                // System.err.println("--->"+key);
+            }
+            if (key.Length > 0)
+            {
+                tries[levels].Add(key, EOM_NODE);
+            }
+            else
+            {
+                tries[levels].Add(lastkey, EOM_NODE);
+            }
+        }
+
+        /// <summary>
+        /// Break the given patch command into its constituent pieces. The pieces are
+        /// delimited by NOOP commands.
+        /// </summary>
+        /// <param name="cmd">the patch command</param>
+        /// <returns>an array containing the pieces of the command</returns>
+        public virtual string[] Decompose(string cmd)
+        {
+            int parts = 0;
+
+            for (int i = 0; 0 <= i && i < cmd.Length;)
+            {
+                int next = DashEven(cmd, i);
+                if (i == next)
+                {
+                    parts++;
+                    i = next + 2;
+                }
+                else
+                {
+                    parts++;
+                    i = next;
+                }
+            }
+
+            string[] part = new string[parts];
+            int x = 0;
+
+            for (int i = 0; 0 <= i && i < cmd.Length;)
+            {
+                int next = DashEven(cmd, i);
+                if (i == next)
+                {
+                    part[x++] = cmd.Substring(i, 2);
+                    i = next + 2;
+                }
+                else
+                {
+                    part[x++] = (next < 0) ? cmd.Substring(i, cmd.Length - i) : cmd.Substring(i, next - i);
+                    i = next;
+                }
+            }
+            return part;
+        }
+
+        /// <summary>
+        /// Remove empty rows from the given Trie and return the newly reduced Trie.
+        /// </summary>
+        /// <param name="by">the <see cref="Trie"/> to reduce</param>
+        /// <returns>the newly reduced Trie</returns>
+        public override Trie Reduce(Reduce by)
+        {
+            List<Trie> h = new List<Trie>();
+            foreach (Trie trie in tries)
+                h.Add(trie.Reduce(by));
+
+            MultiTrie2 m = new MultiTrie2(forward);
+            m.tries = h;
+            return m;
+        }
+
+        private bool CannotFollow(char after, char goes)
+        {
+            switch (after)
+            {
+                case '-':
+                case 'D':
+                    return after == goes;
+            }
+            return false;
+        }
+
+        private bool TrySkip(string @in, int count, out string result)
+        {
+            // LUCENENET: Rather than relying on this to throw an exception by passing a negative
+            // length to Substring like they did in Java, we check that the value
+            // is negative and return false to the caller so it can safely break out
+            // of the loop.
+            int skipLength = @in.Length - count;
+            if (skipLength < 0)
+            {
+                result = string.Empty;
+                return false;
+            }
+            if (forward)
+            {
+                result = @in.Substring(count, skipLength);
+            }
+            else
+            {
+                result = @in.Substring(0, (skipLength) - 0);
+            }
+            return true;
+        }
+
+        private int DashEven(string @in, int from)
+        {
+            while (from < @in.Length)
+            {
+                if (@in[from] == '-')
+                {
+                    return from;
+                }
+                else
+                {
+                    from += 2;
+                }
+            }
+            return -1;
+        }
+
+
+        private int LengthPP(string cmd)
+        {
+            int len = 0;
+            for (int i = 0; i < cmd.Length; i++)
+            {
+                switch (cmd[i++])
+                {
+                    case '-':
+                    case 'D':
+                        len += cmd[i] - 'a' + 1;
+                        break;
+                    case 'R':
+                        len++; /* intentional fallthrough */
+                        goto case 'I';
+                    case 'I':
+                        break;
+                }
+            }
+            return len;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/29525086/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer.cs
new file mode 100644
index 0000000..e299452
--- /dev/null
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Optimizer.cs
@@ -0,0 +1,227 @@
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
+
+/*
+                    Egothor Software License version 1.00
+                    Copyright (C) 1997-2004 Leo Galambos.
+                 Copyright (C) 2002-2004 "Egothor developers"
+                      on behalf of the Egothor Project.
+                             All rights reserved.
+
+   This  software  is  copyrighted  by  the "Egothor developers". If this
+   license applies to a single file or document, the "Egothor developers"
+   are the people or entities mentioned as copyright holders in that file
+   or  document.  If  this  license  applies  to the Egothor project as a
+   whole,  the  copyright holders are the people or entities mentioned in
+   the  file CREDITS. This file can be found in the same location as this
+   license in the distribution.
+
+   Redistribution  and  use  in  source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+    1. Redistributions  of  source  code  must retain the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       following disclaimer.
+    2. Redistributions  in binary form must reproduce the above copyright
+       notice, the list of contributors, this list of conditions, and the
+       disclaimer  that  follows  these  conditions  in the documentation
+       and/or other materials provided with the distribution.
+    3. The name "Egothor" must not be used to endorse or promote products
+       derived  from  this software without prior written permission. For
+       written permission, please contact Leo.G@seznam.cz
+    4. Products  derived  from this software may not be called "Egothor",
+       nor  may  "Egothor"  appear  in  their name, without prior written
+       permission from Leo.G@seznam.cz.
+
+   In addition, we request that you include in the end-user documentation
+   provided  with  the  redistribution  and/or  in the software itself an
+   acknowledgement equivalent to the following:
+   "This product includes software developed by the Egothor Project.
+    http://egothor.sf.net/"
+
+   THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES,  INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY  AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN  NO  EVENT  SHALL THE EGOTHOR PROJECT OR ITS CONTRIBUTORS BE LIABLE
+   FOR   ANY   DIRECT,   INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
+   CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE  GOODS  OR  SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR
+   BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   This  software  consists  of  voluntary  contributions  made  by  many
+   individuals  on  behalf  of  the  Egothor  Project  and was originally
+   created by Leo Galambos (Leo.G@seznam.cz).
+ */
+
+namespace Egothor.Stemmer
+{
+    /// <summary>
+    /// The <see cref="Optimizer"/> class is a <see cref="Trie"/> that will be reduced (have empty rows removed).
+    /// <para>
+    /// The reduction will be made by joining two rows where the first is a subset of
+    /// the second.
+    /// </para>
+    /// </summary>
+    public class Optimizer : Reduce
+    {
+        /// <summary>
+        /// Constructor for the <see cref="Optimizer"/> object.
+        /// </summary>
+        public Optimizer() { }
+
+        /// <summary>
+        /// Optimize (remove empty rows) from the given Trie and return the resulting
+        /// Trie.
+        /// </summary>
+        /// <param name="orig">the <see cref="Trie"/> to consolidate</param>
+        /// <returns>the newly consolidated Trie</returns>
+        public override Trie Optimize(Trie orig)
+        {
+            IList<string> cmds = orig.cmds;
+            IList<Row> rows = new List<Row>();
+            IList<Row> orows = orig.rows;
+            int[] remap = new int[orows.Count];
+
+            for (int j = orows.Count - 1; j >= 0; j--)
+            {
+                Row now = new Remap(orows[j], remap);
+                bool merged = false;
+
+                for (int i = 0; i < rows.Count; i++)
+                {
+                    Row q = Merge(now, rows[i]);
+                    if (q != null)
+                    {
+                        rows[i] = q;
+                        merged = true;
+                        remap[j] = i;
+                        break;
+                    }
+                }
+
+                if (merged == false)
+                {
+                    remap[j] = rows.Count;
+                    rows.Add(now);
+                }
+            }
+
+            int root = remap[orig.root];
+            Arrays.Fill(remap, -1);
+            rows = RemoveGaps(root, rows, new List<Row>(), remap);
+
+            return new Trie(orig.forward, remap[root], cmds, rows);
+        }
+
+        /// <summary>
+        /// Merge the given rows and return the resulting <see cref="Row"/>.
+        /// </summary>
+        /// <param name="master">the master <see cref="Row"/></param>
+        /// <param name="existing">the existing <see cref="Row"/></param>
+        /// <returns>the resulting <see cref="Row"/>, or <c>null</c> if the operation cannot be realized</returns>
+        public Row Merge(Row master, Row existing)
+        {
+            var i = master.cells.Keys.GetEnumerator();
+            Row n = new Row();
+            for (; i.MoveNext();)
+            {
+                char ch = i.Current;
+                // XXX also must handle Cnt and Skip !!
+                Cell a = master.cells.ContainsKey(ch) ? master.cells[ch] : null;
+                Cell b = existing.cells.ContainsKey(ch) ? existing.cells[ch] : null;
+
+                Cell s = (b == null) ? new Cell(a) : Merge(a, b);
+                if (s == null)
+                {
+                    return null;
+                }
+                n.cells[ch] = s;
+            }
+            i = existing.cells.Keys.GetEnumerator();
+            for (; i.MoveNext();)
+            {
+                char ch = i.Current;
+                if (master.At(ch) != null)
+                {
+                    continue;
+                }
+                n.cells[ch] = existing.At(ch);
+            }
+            return n;
+        }
+
+        /// <summary>
+        /// Merge the given <see cref="Cell"/>s and return the resulting <see cref="Cell"/>.
+        /// </summary>
+        /// <param name="m">the master <see cref="Cell"/></param>
+        /// <param name="e">the existing <see cref="Cell"/></param>
+        /// <returns>the resulting <see cref="Cell"/>, or <c>null</c> if the operation cannot be realized</returns>
+        public virtual Cell Merge(Cell m, Cell e)
+        {
+            Cell n = new Cell();
+
+            if (m.skip != e.skip)
+            {
+                return null;
+            }
+
+            if (m.cmd >= 0)
+            {
+                if (e.cmd >= 0)
+                {
+                    if (m.cmd == e.cmd)
+                    {
+                        n.cmd = m.cmd;
+                    }
+                    else
+                    {
+                        return null;
+                    }
+                }
+                else
+                {
+                    n.cmd = m.cmd;
+                }
+            }
+            else
+            {
+                n.cmd = e.cmd;
+            }
+            if (m.@ref >= 0)
+            {
+                if (e.@ref >= 0)
+                {
+                    if (m.@ref == e.@ref)
+                    {
+                        if (m.skip == e.skip)
+                        {
+                            n.@ref = m.@ref;
+                        }
+                        else
+                        {
+                            return null;
+                        }
+                    }
+                    else
+                    {
+                        return null;
+                    }
+                }
+                else
+                {
+                    n.@ref = m.@ref;
+                }
+            }
+            else
+            {
+                n.@ref = e.@ref;
+            }
+            n.cnt = m.cnt + e.cnt;
+            n.skip = m.skip;
+            return n;
+        }
+    }
+}


[08/50] [abbrv] lucenenet git commit: Added missing asserts to Core.Util.TestVersion.TestDeprecations()

Posted by ni...@apache.org.
Added missing asserts to Core.Util.TestVersion.TestDeprecations()


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

Branch: refs/heads/master
Commit: 7517a735600bcb0fb7f35122860faed1b2bdd410
Parents: bff0161
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 06:23:31 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:52 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/TestVersion.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7517a735/src/Lucene.Net.Tests/core/Util/TestVersion.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestVersion.cs b/src/Lucene.Net.Tests/core/Util/TestVersion.cs
index 1510007..2eb6295 100644
--- a/src/Lucene.Net.Tests/core/Util/TestVersion.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestVersion.cs
@@ -55,15 +55,15 @@ namespace Lucene.Net.Util
                 {
                     Assert.AreEqual(LuceneVersion.LUCENE_CURRENT, values[i], "Last constant must be LUCENE_CURRENT");
                 }
-                /*bool dep = typeof(Version).GetField(values[i].Name()).isAnnotationPresent(typeof(Deprecated));
+                bool dep = typeof(LuceneVersion).GetField(values[i].ToString()).GetCustomAttributes(typeof(ObsoleteAttribute), false).Any();
                 if (i + 2 != values.Length)
                 {
-                  Assert.IsTrue(values[i].name() + " should be deprecated", dep);
+                    assertTrue(values[i].ToString() + " should be deprecated", dep);
                 }
                 else
                 {
-                  Assert.IsFalse(values[i].name() + " should not be deprecated", dep);
-                }*/
+                    assertFalse(values[i].ToString() + " should not be deprecated", dep);
+                }
             }
         }
 


[43/50] [abbrv] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
index 2ce76f3..dc18580 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Codecs.Lucene45
 {
     /*
@@ -34,5 +36,530 @@ namespace Lucene.Net.Codecs.Lucene45
                 return Codec_Renamed;
             }
         }
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
index bf0a5fe..cbf656c 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
@@ -153,5 +153,506 @@ namespace Lucene.Net.Codecs.Perfield
                 }
             }
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
index d2275e8..05751f9 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
@@ -45,5 +45,56 @@ namespace Lucene.Net.Codecs.Perfield
             //LUCENE TO-DO
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
index 70ee586..628ddc0 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Index
 {
     /*
@@ -39,5 +41,506 @@ namespace Lucene.Net.Index
         {
             return TestUtil.FieldSupportsHugeBinaryDocValues(field);
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs b/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
index e99678b..921b719 100644
--- a/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Index
 {
     /*
@@ -23,5 +25,18 @@ namespace Lucene.Net.Index
         {
             return NewLogMergePolicy(Random());
         }
+
+        #region BaseMergePolicyTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestForceMergeNotNeeded()
+        {
+            base.TestForceMergeNotNeeded();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
index 7f425f7..c48b98f 100644
--- a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
@@ -1527,7 +1527,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        [Test, Timeout(120000)]
         public virtual void TestTonsOfUpdates()
         {
             // LUCENE-5248: make sure that when there are many updates, we don't use too much RAM

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs b/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
index 70c47cc..7d49c1b 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
@@ -208,5 +208,55 @@ namespace Lucene.Net.Index
             Assert.AreEqual(0, psdp.SnapshotCount, "Should have no snapshots !");
             dir.Dispose();
         }
+
+
+        #region TestSnapshotDeletionPolicy
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestSnapshotDeletionPolicy_Mem()
+        {
+            base.TestSnapshotDeletionPolicy_Mem();
+        }
+
+        [Test]
+        public override void TestBasicSnapshots()
+        {
+            base.TestBasicSnapshots();
+        }
+
+        [Test]
+        public override void TestMultiThreadedSnapshotting()
+        {
+            base.TestMultiThreadedSnapshotting();
+        }
+
+        [Test]
+        public override void TestRollbackToOldSnapshot()
+        {
+            base.TestRollbackToOldSnapshot();
+        }
+
+        [Test]
+        public override void TestReleaseSnapshot()
+        {
+            base.TestReleaseSnapshot();
+        }
+
+        [Test]
+        public override void TestSnapshotLastCommitTwice()
+        {
+            base.TestSnapshotLastCommitTwice();
+        }
+
+        [Test]
+        public override void TestMissingCommits()
+        {
+            base.TestMissingCommits();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
index 427aa96..20c6b07 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
@@ -41,5 +41,55 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
index 902db7f..31ed10c 100644
--- a/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
@@ -47,5 +47,88 @@ namespace Lucene.Net.Index
             // and merge into newly formed 3.x segments.
             base.TestWriteReadMerge();
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test, Timeout(120000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
index 38f08d4..dac8fa8 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
@@ -58,5 +58,60 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
+
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
index 922551c..ede9691 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
@@ -273,5 +273,19 @@ namespace Lucene.Net.Index
 
             // TODO: Add more checks for other non-double setters!
         }
+
+
+        #region BaseMergePolicyTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestForceMergeNotNeeded()
+        {
+            base.TestForceMergeNotNeeded();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
index 96ec2f4..16a6d17 100644
--- a/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
@@ -192,7 +192,7 @@ namespace Lucene.Net.Search
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestPad()
         {
             int[] tests = new int[] { -9999999, -99560, -100, -3, -1, 0, 3, 9, 10, 1000, 999999999 };

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
index 735dc0c..307c51f 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
@@ -33,5 +33,219 @@ namespace Lucene.Net.Search.Spans
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
+
+
+        #region TestSpanExplanations
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestST1()
+        {
+            base.TestST1();
+        }
+
+        [Test]
+        public override void TestST2()
+        {
+            base.TestST2();
+        }
+
+        [Test]
+        public override void TestST4()
+        {
+            base.TestST4();
+        }
+
+        [Test]
+        public override void TestST5()
+        {
+            base.TestST5();
+        }
+
+        /* some SpanFirstQueries */
+
+        [Test]
+        public override void TestSF1()
+        {
+            base.TestSF1();
+        }
+
+        [Test]
+        public override void TestSF2()
+        {
+            base.TestSF2();
+        }
+
+        [Test]
+        public override void TestSF4()
+        {
+            base.TestSF4();
+        }
+
+        [Test]
+        public override void TestSF5()
+        {
+            base.TestSF5();
+        }
+
+        [Test]
+        public override void TestSF6()
+        {
+            base.TestSF6();
+        }
+
+        /* some SpanOrQueries */
+
+        [Test]
+        public override void TestSO1()
+        {
+            base.TestSO1();
+        }
+
+        [Test]
+        public override void TestSO2()
+        {
+            base.TestSO2();
+        }
+
+        [Test]
+        public override void TestSO3()
+        {
+            base.TestSO3();
+        }
+
+        [Test]
+        public override void TestSO4()
+        {
+            base.TestSO4();
+        }
+
+        /* some SpanNearQueries */
+
+        [Test]
+        public override void TestSNear1()
+        {
+            base.TestSNear1();
+        }
+
+        [Test]
+        public override void TestSNear2()
+        {
+            base.TestSNear2();
+        }
+
+        [Test]
+        public override void TestSNear3()
+        {
+            base.TestSNear3();
+        }
+
+        [Test]
+        public override void TestSNear4()
+        {
+            base.TestSNear4();
+        }
+
+        [Test]
+        public override void TestSNear5()
+        {
+            base.TestSNear5();
+        }
+
+        [Test]
+        public override void TestSNear6()
+        {
+            base.TestSNear6();
+        }
+
+        [Test]
+        public override void TestSNear7()
+        {
+            base.TestSNear7();
+        }
+
+        [Test]
+        public override void TestSNear8()
+        {
+            base.TestSNear8();
+        }
+
+        [Test]
+        public override void TestSNear9()
+        {
+            base.TestSNear9();
+        }
+
+        [Test]
+        public override void TestSNear10()
+        {
+            base.TestSNear10();
+        }
+
+        [Test]
+        public override void TestSNear11()
+        {
+            base.TestSNear11();
+        }
+
+        /* some SpanNotQueries */
+
+        [Test]
+        public override void TestSNot1()
+        {
+            base.TestSNot1();
+        }
+
+        [Test]
+        public override void TestSNot2()
+        {
+            base.TestSNot2();
+        }
+
+        [Test]
+        public override void TestSNot4()
+        {
+            base.TestSNot4();
+        }
+
+        [Test]
+        public override void TestSNot5()
+        {
+            base.TestSNot5();
+        }
+
+        [Test]
+        public override void TestSNot7()
+        {
+            base.TestSNot7();
+        }
+
+        [Test]
+        public override void TestSNot10()
+        {
+            base.TestSNot10();
+        }
+
+        #endregion
+
+        #region TestExplanations
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+
+        /// <summary>
+        /// Placeholder: JUnit freaks if you don't have one test ... making
+        /// class abstract doesn't help
+        /// </summary>
+        [Test]
+        public override void TestNoop()
+        {
+            base.TestNoop();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
index fbfe049..18a2759 100644
--- a/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
@@ -33,5 +33,165 @@ namespace Lucene.Net.Search
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
+
+
+        #region TestComplexExplanations
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void Test1()
+        {
+            base.Test1();
+        }
+
+        [Test]
+        public override void Test2()
+        {
+            base.Test2();
+        }
+
+        // :TODO: we really need more crazy complex cases.
+
+        // //////////////////////////////////////////////////////////////////
+
+        // The rest of these aren't that complex, but they are <i>somewhat</i>
+        // complex, and they expose weakness in dealing with queries that match
+        // with scores of 0 wrapped in other queries
+
+        [Test]
+        public override void TestT3()
+        {
+            base.TestT3();
+        }
+
+        [Test]
+        public override void TestMA3()
+        {
+            base.TestMA3();
+        }
+
+        [Test]
+        public override void TestFQ5()
+        {
+            base.TestFQ5();
+        }
+
+        [Test]
+        public override void TestCSQ4()
+        {
+            base.TestCSQ4();
+        }
+
+        [Test]
+        public override void TestDMQ10()
+        {
+            base.TestDMQ10();
+        }
+
+        [Test]
+        public override void TestMPQ7()
+        {
+            base.TestMPQ7();
+        }
+
+        [Test]
+        public override void TestBQ12()
+        {
+            base.TestBQ12();
+        }
+
+        [Test]
+        public override void TestBQ13()
+        {
+            base.TestBQ13();
+        }
+
+        [Test]
+        public override void TestBQ18()
+        {
+            base.TestBQ18();
+        }
+
+        [Test]
+        public override void TestBQ21()
+        {
+            base.TestBQ21();
+        }
+
+        [Test]
+        public override void TestBQ22()
+        {
+            base.TestBQ22();
+        }
+
+        [Test]
+        public override void TestST3()
+        {
+            base.TestST3();
+        }
+
+        [Test]
+        public override void TestST6()
+        {
+            base.TestST6();
+        }
+
+        [Test]
+        public override void TestSF3()
+        {
+            base.TestSF3();
+        }
+
+        [Test]
+        public override void TestSF7()
+        {
+            base.TestSF7();
+        }
+
+        [Test]
+        public override void TestSNot3()
+        {
+            base.TestSNot3();
+        }
+
+        [Test]
+        public override void TestSNot6()
+        {
+            base.TestSNot6();
+        }
+
+        [Test]
+        public override void TestSNot8()
+        {
+            base.TestSNot8();
+        }
+
+        [Test]
+        public override void TestSNot9()
+        {
+            base.TestSNot9();
+        }
+
+        #endregion
+
+        #region TestExplanations
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+
+        /// <summary>
+        /// Placeholder: JUnit freaks if you don't have one test ... making
+        /// class abstract doesn't help
+        /// </summary>
+        [Test]
+        public override void TestNoop()
+        {
+            base.TestNoop();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestExplanations.cs b/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
index a528615..18962f9 100644
--- a/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
@@ -261,7 +261,7 @@ namespace Lucene.Net.Search
         /// Placeholder: JUnit freaks if you don't have one test ... making
         /// class abstract doesn't help
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNoop()
         {
             /* NOOP */

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
index cc0d022..f0e44a8 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
@@ -590,5 +590,19 @@ namespace Lucene.Net.Search
             reader.Dispose();
             dir.Dispose();
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestPad()
+        {
+            base.TestPad();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
index 0fc6843..1b923a3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
@@ -60,5 +60,22 @@ namespace Lucene.Net.Search
             Assert.IsFalse(a1.Equals(b));
             QueryUtils.Check(a1);
         }
+
+
+
+        #region TestSnapshotDeletionPolicy
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// test a bunch of random regular expressions </summary>
+        [Test, Timeout(60000)]
+        public override void TestRegexps()
+        {
+            base.TestRegexps();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
index f52d360..7f95d2a 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
@@ -551,5 +551,19 @@ namespace Lucene.Net.Search
             result = search.Search(Csrq("rand", maxRP, null, T, F), null, numDocs).ScoreDocs;
             AssertEquals("max,nul,T,T", 1, result.Length);
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestPad()
+        {
+            base.TestPad();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestSimpleExplanations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanations.cs b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanations.cs
index 304a837..5fec12f 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanations.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanations.cs
@@ -927,5 +927,24 @@ namespace Lucene.Net.Search
 
             Qtest(query, new int[] { 0, 1, 2, 3 });
         }
+
+
+        #region TestExplanations
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+
+        /// <summary>
+        /// Placeholder: JUnit freaks if you don't have one test ... making
+        /// class abstract doesn't help
+        /// </summary>
+        [Test]
+        public override void TestNoop()
+        {
+            base.TestNoop();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
index 6b45673..ee990c1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
@@ -33,5 +33,457 @@ namespace Lucene.Net.Search
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
+
+
+        #region TestSimpleExplanations
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestT1()
+        {
+            base.TestT1();
+        }
+
+        [Test]
+        public override void TestT2()
+        {
+            base.TestT2();
+        }
+
+        /* MatchAllDocs */
+
+        [Test]
+        public override void TestMA1()
+        {
+            base.TestMA1();
+        }
+
+        [Test]
+        public override void TestMA2()
+        {
+            base.TestMA2();
+        }
+
+        /* some simple phrase tests */
+
+        [Test]
+        public override void TestP1()
+        {
+            base.TestP1();
+        }
+
+        [Test]
+        public override void TestP2()
+        {
+            base.TestP2();
+        }
+
+        [Test]
+        public override void TestP3()
+        {
+            base.TestP3();
+        }
+
+        [Test]
+        public override void TestP4()
+        {
+            base.TestP4();
+        }
+
+        [Test]
+        public override void TestP5()
+        {
+            base.TestP5();
+        }
+
+        [Test]
+        public override void TestP6()
+        {
+            base.TestP6();
+        }
+
+        [Test]
+        public override void TestP7()
+        {
+            base.TestP7();
+        }
+
+        /* some simple filtered query tests */
+
+        [Test]
+        public override void TestFQ1()
+        {
+            base.TestFQ1();
+        }
+
+        [Test]
+        public override void TestFQ2()
+        {
+            base.TestFQ2();
+        }
+
+        [Test]
+        public override void TestFQ3()
+        {
+            base.TestFQ3();
+        }
+
+        [Test]
+        public override void TestFQ4()
+        {
+            base.TestFQ4();
+        }
+
+        [Test]
+        public override void TestFQ6()
+        {
+            base.TestFQ6();
+        }
+
+        /* ConstantScoreQueries */
+
+        [Test]
+        public override void TestCSQ1()
+        {
+            base.TestCSQ1();
+        }
+
+        [Test]
+        public override void TestCSQ2()
+        {
+            base.TestCSQ2();
+        }
+
+        [Test]
+        public override void TestCSQ3()
+        {
+            base.TestCSQ3();
+        }
+
+        /* DisjunctionMaxQuery */
+
+        [Test]
+        public override void TestDMQ1()
+        {
+            base.TestDMQ1();
+        }
+
+        [Test]
+        public override void TestDMQ2()
+        {
+            base.TestDMQ2();
+        }
+
+        [Test]
+        public override void TestDMQ3()
+        {
+            base.TestDMQ3();
+        }
+
+        [Test]
+        public override void TestDMQ4()
+        {
+            base.TestDMQ4();
+        }
+
+        [Test]
+        public override void TestDMQ5()
+        {
+            base.TestDMQ5();
+        }
+
+        [Test]
+        public override void TestDMQ6()
+        {
+            base.TestDMQ6();
+        }
+
+        [Test]
+        public override void TestDMQ7()
+        {
+            base.TestDMQ7();
+        }
+
+        [Test]
+        public override void TestDMQ8()
+        {
+            base.TestDMQ8();
+        }
+
+        [Test]
+        public override void TestDMQ9()
+        {
+            base.TestDMQ9();
+        }
+
+        /* MultiPhraseQuery */
+
+        [Test]
+        public override void TestMPQ1()
+        {
+            base.TestMPQ1();
+        }
+
+        [Test]
+        public override void TestMPQ2()
+        {
+            base.TestMPQ2();
+        }
+
+        [Test]
+        public override void TestMPQ3()
+        {
+            base.TestMPQ3();
+        }
+
+        [Test]
+        public override void TestMPQ4()
+        {
+            base.TestMPQ4();
+        }
+
+        [Test]
+        public override void TestMPQ5()
+        {
+            base.TestMPQ5();
+        }
+
+        [Test]
+        public override void TestMPQ6()
+        {
+            base.TestMPQ6();
+        }
+
+        /* some simple tests of boolean queries containing term queries */
+
+        [Test]
+        public override void TestBQ1()
+        {
+            base.TestBQ1();
+        }
+
+        [Test]
+        public override void TestBQ2()
+        {
+            base.TestBQ2();
+        }
+
+        [Test]
+        public override void TestBQ3()
+        {
+            base.TestBQ3();
+        }
+
+        [Test]
+        public override void TestBQ4()
+        {
+            base.TestBQ4();
+        }
+
+        [Test]
+        public override void TestBQ5()
+        {
+            base.TestBQ5();
+        }
+
+        [Test]
+        public override void TestBQ6()
+        {
+            base.TestBQ6();
+        }
+
+        [Test]
+        public override void TestBQ7()
+        {
+            base.TestBQ7();
+        }
+
+        [Test]
+        public override void TestBQ8()
+        {
+            base.TestBQ8();
+        }
+
+        [Test]
+        public override void TestBQ9()
+        {
+            base.TestBQ9();
+        }
+
+        [Test]
+        public override void TestBQ10()
+        {
+            base.TestBQ10();
+        }
+
+        [Test]
+        public override void TestBQ11()
+        {
+            base.TestBQ11();
+        }
+
+        [Test]
+        public override void TestBQ14()
+        {
+            base.TestBQ14();
+        }
+
+        [Test]
+        public override void TestBQ15()
+        {
+            base.TestBQ15();
+        }
+
+        [Test]
+        public override void TestBQ16()
+        {
+            base.TestBQ16();
+        }
+
+        [Test]
+        public override void TestBQ17()
+        {
+            base.TestBQ17();
+        }
+
+        [Test]
+        public override void TestBQ19()
+        {
+            base.TestBQ19();
+        }
+
+        [Test]
+        public override void TestBQ20()
+        {
+            base.TestBQ20();
+        }
+
+        /* BQ of TQ: using alt so some fields have zero boost and some don't */
+
+        [Test]
+        public override void TestMultiFieldBQ1()
+        {
+            base.TestMultiFieldBQ1();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ2()
+        {
+            base.TestMultiFieldBQ2();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ3()
+        {
+            base.TestMultiFieldBQ3();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ4()
+        {
+            base.TestMultiFieldBQ4();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ5()
+        {
+            base.TestMultiFieldBQ5();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ6()
+        {
+            base.TestMultiFieldBQ6();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ7()
+        {
+            base.TestMultiFieldBQ7();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ8()
+        {
+            base.TestMultiFieldBQ8();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ9()
+        {
+            base.TestMultiFieldBQ9();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ10()
+        {
+            base.TestMultiFieldBQ10();
+        }
+
+        /* BQ of PQ: using alt so some fields have zero boost and some don't */
+
+        [Test]
+        public override void TestMultiFieldBQofPQ1()
+        {
+            base.TestMultiFieldBQofPQ1();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ2()
+        {
+            base.TestMultiFieldBQofPQ2();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ3()
+        {
+            base.TestMultiFieldBQofPQ3();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ4()
+        {
+            base.TestMultiFieldBQofPQ4();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ5()
+        {
+            base.TestMultiFieldBQofPQ5();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ6()
+        {
+            base.TestMultiFieldBQofPQ6();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ7()
+        {
+            base.TestMultiFieldBQofPQ7();
+        }
+
+        #endregion
+
+        #region TestExplanations
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+
+        /// <summary>
+        /// Placeholder: JUnit freaks if you don't have one test ... making
+        /// class abstract doesn't help
+        /// </summary>
+        [Test]
+        public override void TestNoop()
+        {
+            base.TestNoop();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4dbc3590/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
index bb1c4d0..f8c9fb3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
@@ -177,5 +177,19 @@ namespace Lucene.Net.Search
             result = search.Search(q, TermRangeFilter.NewStringRange("rand", maxRP, null, T, F), numDocs).ScoreDocs;
             Assert.AreEqual(1, result.Length, "max,nul,T,T");
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestPad()
+        {
+            base.TestPad();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file


[07/50] [abbrv] lucenenet git commit: Added missing test Core.Util.TestMathUtil

Posted by ni...@apache.org.
Added missing test Core.Util.TestMathUtil


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

Branch: refs/heads/master
Commit: aff0579eee93b9868dd5699b5bedd98998dc66d7
Parents: 4b7b267
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 16 05:08:59 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 20 18:20:51 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Util/MathUtil.cs           |  5 +--
 src/Lucene.Net.Tests/Lucene.Net.Tests.csproj   |  1 +
 src/Lucene.Net.Tests/core/Util/TestMathUtil.cs | 36 ++++++++++++++-------
 3 files changed, 28 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aff0579e/src/Lucene.Net.Core/Util/MathUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/MathUtil.cs b/src/Lucene.Net.Core/Util/MathUtil.cs
index 87d0aa0..4ea0a6d 100644
--- a/src/Lucene.Net.Core/Util/MathUtil.cs
+++ b/src/Lucene.Net.Core/Util/MathUtil.cs
@@ -68,8 +68,9 @@ namespace Lucene.Net.Util
         // see http://en.wikipedia.org/wiki/Binary_GCD_algorithm#Iterative_version_in_C.2B.2B_using_ctz_.28count_trailing_zeros.29
         public static long Gcd(long a, long b)
         {
-            a = Math.Abs(a);
-            b = Math.Abs(b);
+            // LUCENENET: Math.Abs and BigInteger.Abs get an OverflowException, so we resort to this.
+            a = a < 0 ? -a : a;
+            b = b < 0 ? -b : b;
             if (a == 0)
             {
                 return b;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aff0579e/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index c0ec82b..8cf8890 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -592,6 +592,7 @@
     <Compile Include="core\Util\TestLongBitSet.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="core\Util\TestMathUtil.cs" />
     <Compile Include="core\Util\TestMergedIterator.cs">
       <SubType>Code</SubType>
     </Compile>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aff0579e/src/Lucene.Net.Tests/core/Util/TestMathUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestMathUtil.cs b/src/Lucene.Net.Tests/core/Util/TestMathUtil.cs
index 8cf5f1d..f2272d3 100644
--- a/src/Lucene.Net.Tests/core/Util/TestMathUtil.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestMathUtil.cs
@@ -1,12 +1,11 @@
-using System;
-using System.Diagnostics;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
 using NUnit.Framework;
+using System;
+using System.Linq;
 
 namespace Lucene.Net.Util
 {
-
     /*
      * Licensed to the Apache Software Foundation (ASF) under one or more
      * contributor license agreements.  See the NOTICE file distributed with
@@ -60,11 +59,16 @@ namespace Lucene.Net.Util
         }
 
         // slow version used for testing
-        internal static long Gcd(long l1, long l2)
+        private static bool TryGetGcd(long a, long b, out long result)
         {
-            System.Numerics.BigInteger gcd = System.Numerics.BigInteger.ValueOf(l1).gcd(System.Numerics.BigInteger.ValueOf(l2));
-            Debug.Assert(gcd.BitCount() <= 64);
-            return (long)gcd;
+            result = 0;
+            var c = System.Numerics.BigInteger.GreatestCommonDivisor(a, b);
+            if (c <= long.MaxValue && c >= long.MinValue)
+            {
+                result = (long)c;
+                return true;
+            }
+            return false; // would overflow
         }
 
         [Test]
@@ -76,12 +80,20 @@ namespace Lucene.Net.Util
                 long l1 = RandomLong();
                 long l2 = RandomLong();
                 long gcd = MathUtil.Gcd(l1, l2);
-                long actualGcd = Gcd(l1, l2);
-                Assert.AreEqual(actualGcd, gcd);
-                if (gcd != 0)
+                long actualGcd;
+                if (TryGetGcd(l1, l2, out actualGcd))
+                {
+                    Assert.AreEqual(actualGcd, gcd);
+                    if (gcd != 0)
+                    {
+                        Assert.AreEqual(l1, (l1 / gcd) * gcd);
+                        Assert.AreEqual(l2, (l2 / gcd) * gcd);
+                    }
+                }
+                else
                 {
-                    Assert.AreEqual(l1, (l1 / gcd) * gcd);
-                    Assert.AreEqual(l2, (l2 / gcd) * gcd);
+                    // GCD cast to long would fail, try again
+                    i--;
                 }
             }
         }