diff --git a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
index 80c51f61ac..adb35b2776 100644
--- a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
@@ -348,9 +348,9 @@ private static SeedPostings GetSeedPostings(string term, long seed, bool withLiv
}
[NUnit.Framework.OneTimeSetUp]
- public override void BeforeClass() // Renamed from CreatePostings to ensure the base class setup is called before this one
+ public override void OneTimeSetUp() // Renamed from CreatePostings to ensure the base class setup is called before this one
{
- base.BeforeClass();
+ base.OneTimeSetUp();
totalPostings = 0;
totalPayloadBytes = 0;
@@ -375,7 +375,7 @@ public override void BeforeClass() // Renamed from CreatePostings to ensure the
continue;
}
- fieldInfoArray[fieldUpto] = new FieldInfo(field, true, fieldUpto, false, false, true,
+ fieldInfoArray[fieldUpto] = new FieldInfo(field, true, fieldUpto, false, false, true,
IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS,
DocValuesType.NONE, DocValuesType.NUMERIC, null);
fieldUpto++;
@@ -472,13 +472,13 @@ public override void BeforeClass() // Renamed from CreatePostings to ensure the
}
[NUnit.Framework.OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
allTerms = null;
fieldInfos = null;
fields = null;
globalLiveDocs = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
// TODO maybe instead of @BeforeClass just make a single test run: build postings & index & test it?
@@ -653,18 +653,18 @@ private class ThreadState
public DocsAndPositionsEnum ReuseDocsAndPositionsEnum { get; set; }
}
- private void VerifyEnum(ThreadState threadState,
- string field,
- BytesRef term,
+ private void VerifyEnum(ThreadState threadState,
+ string field,
+ BytesRef term,
TermsEnum termsEnum,
// Maximum options (docs/freqs/positions/offsets) to test:
- IndexOptions maxTestOptions,
-
- IndexOptions maxIndexOptions,
- ISet options,
+ IndexOptions maxTestOptions,
+
+ IndexOptions maxIndexOptions,
+ ISet options,
bool alwaysTestMax)
-
+
{
if (Verbose)
{
@@ -698,9 +698,9 @@ private void VerifyEnum(ThreadState threadState,
FieldInfo fieldInfo = currentFieldInfos.FieldInfo(field);
// NOTE: can be empty list if we are using liveDocs:
- SeedPostings expected = GetSeedPostings(term.Utf8ToString(),
- fields[field][term],
- useLiveDocs,
+ SeedPostings expected = GetSeedPostings(term.Utf8ToString(),
+ fields[field][term],
+ useLiveDocs,
maxIndexOptions);
Assert.AreEqual(expected.DocFreq, termsEnum.DocFreq);
@@ -710,12 +710,12 @@ private void VerifyEnum(ThreadState threadState,
bool doCheckFreqs = allowFreqs && (alwaysTestMax || Random.Next(3) <= 2);
// LUCENENET specific - to avoid boxing, changed from CompareTo() to IndexOptionsComparer.Compare()
- bool allowPositions = IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0 &&
+ bool allowPositions = IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0 &&
IndexOptionsComparer.Default.Compare(maxTestOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
bool doCheckPositions = allowPositions && (alwaysTestMax || Random.Next(3) <= 2);
// LUCENENET specific - to avoid boxing, changed from CompareTo() to IndexOptionsComparer.Compare()
- bool allowOffsets = IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >=0 &&
+ bool allowOffsets = IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >=0 &&
IndexOptionsComparer.Default.Compare(maxTestOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
bool doCheckOffsets = allowOffsets && (alwaysTestMax || Random.Next(3) <= 2);
@@ -1099,9 +1099,9 @@ public override void Run()
}
}
- private void TestTerms(Fields fieldsSource, ISet options,
- IndexOptions maxTestOptions,
- IndexOptions maxIndexOptions,
+ private void TestTerms(Fields fieldsSource, ISet options,
+ IndexOptions maxTestOptions,
+ IndexOptions maxIndexOptions,
bool alwaysTestMax)
{
if (options.Contains(Option.THREADS))
@@ -1124,9 +1124,9 @@ private void TestTerms(Fields fieldsSource, ISet options,
}
}
- private void TestTermsOneThread(Fields fieldsSource, ISet options,
- IndexOptions maxTestOptions,
- IndexOptions maxIndexOptions,
+ private void TestTermsOneThread(Fields fieldsSource, ISet options,
+ IndexOptions maxTestOptions,
+ IndexOptions maxIndexOptions,
bool alwaysTestMax)
{
ThreadState threadState = new ThreadState();
@@ -1189,13 +1189,13 @@ private void TestTermsOneThread(Fields fieldsSource, ISet options,
savedTermState = true;
}
- VerifyEnum(threadState,
- fieldAndTerm.Field,
- fieldAndTerm.Term,
- termsEnum,
- maxTestOptions,
- maxIndexOptions,
- options,
+ VerifyEnum(threadState,
+ fieldAndTerm.Field,
+ fieldAndTerm.Term,
+ termsEnum,
+ maxTestOptions,
+ maxIndexOptions,
+ options,
alwaysTestMax);
// Sometimes save term state after pulling the enum:
@@ -1217,13 +1217,13 @@ private void TestTermsOneThread(Fields fieldsSource, ISet options,
Console.WriteLine("TEST: try enum again on same term");
}
- VerifyEnum(threadState,
- fieldAndTerm.Field,
- fieldAndTerm.Term,
- termsEnum,
- maxTestOptions,
- maxIndexOptions,
- options,
+ VerifyEnum(threadState,
+ fieldAndTerm.Field,
+ fieldAndTerm.Term,
+ termsEnum,
+ maxTestOptions,
+ maxIndexOptions,
+ options,
alwaysTestMax);
}
}
@@ -1348,7 +1348,7 @@ public virtual void TestRandom()
protected override void AddRandomFields(Document doc)
{
-
+
foreach (IndexOptions opts in Enum.GetValues(typeof(IndexOptions)))
{
// LUCENENET: Skip our NONE option
@@ -1372,4 +1372,4 @@ protected override void AddRandomFields(Document doc)
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index 5d9a5f894e..4a28cb3aab 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -492,12 +492,12 @@ protected virtual void AssertEquals(RandomDocument doc, Fields fields)
private readonly DisposableThreadLocal docsAndPositionsEnum = new DisposableThreadLocal();
// LUCENENET specific - cleanup DisposableThreadLocal instances after running tests
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
termsEnum.Dispose();
docsEnum.Dispose();
docsAndPositionsEnum.Dispose();
- base.AfterClass();
+ base.OneTimeTearDown();
}
protected virtual void AssertEquals(RandomTokenStream tk, FieldType ft, Terms terms)
diff --git a/src/Lucene.Net.TestFramework/Search/SearchEquivalenceTestBase.cs b/src/Lucene.Net.TestFramework/Search/SearchEquivalenceTestBase.cs
index 162e8e2667..fe1cf558aa 100644
--- a/src/Lucene.Net.TestFramework/Search/SearchEquivalenceTestBase.cs
+++ b/src/Lucene.Net.TestFramework/Search/SearchEquivalenceTestBase.cs
@@ -46,9 +46,9 @@ public abstract class SearchEquivalenceTestBase : LuceneTestCase
protected static string m_stopword; // we always pick a character as a stopword
[NUnit.Framework.OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Random random = Random;
@@ -94,7 +94,7 @@ public override void BeforeClass()
}
[NUnit.Framework.OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
m_reader.Dispose();
m_directory.Dispose();
@@ -103,7 +103,7 @@ public override void AfterClass()
m_directory = null;
m_analyzer = null;
m_s1 = m_s2 = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
///
diff --git a/src/Lucene.Net.TestFramework/Support/Configuration/ConfigurationSettingTestCase.cs b/src/Lucene.Net.TestFramework/Support/Configuration/ConfigurationSettingTestCase.cs
index 4a1eba4b39..524a0ca9d4 100644
--- a/src/Lucene.Net.TestFramework/Support/Configuration/ConfigurationSettingTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Support/Configuration/ConfigurationSettingTestCase.cs
@@ -34,9 +34,9 @@ public abstract class ConfigurationSettingsTestCase : LuceneTestCase
protected abstract IConfiguration LoadConfiguration();
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
var configuration = LoadConfiguration();
// Set up mocks for ConfigurationSettings and SystemProperties
ConfigurationSettings = new ConfigurationSettingsImpl(configuration);
diff --git a/src/Lucene.Net.TestFramework/Support/Util/LuceneTestFrameworkInitializer.cs b/src/Lucene.Net.TestFramework/Support/Util/LuceneTestFrameworkInitializer.cs
index d3391b1219..b04b6ed639 100644
--- a/src/Lucene.Net.TestFramework/Support/Util/LuceneTestFrameworkInitializer.cs
+++ b/src/Lucene.Net.TestFramework/Support/Util/LuceneTestFrameworkInitializer.cs
@@ -261,7 +261,7 @@ internal void DoTestFrameworkTearDown()
/// Access to the current instance. It is safe to use
/// this method from multiple threads, etc., but it should be called while within a runner's
/// scope (so no static initializers). The returned instance will be
- /// different when this method is called inside a hook (static
+ /// different when this method is called inside a hook (static
/// suite scope) and within / hooks or test methods.
///
/// The returned instance must not be shared with other threads or cross a single scope's
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index 56016c3ffe..52ccaf1abd 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -66,8 +66,14 @@ namespace Lucene.Net.Util
/// Class and instance setup.
///
///
- /// The preferred way to specify class (suite-level) setup/cleanup is to use
- /// static methods annotated with and . Any
+ /// The preferred way to specify class (suite-level) setup/cleanup is to override
+ /// and . Be sure
+ /// to call base.OneTimeSetUp() BEFORE you initialize your class and
+ /// call base.OneTimeTearDown() AFTER you clean up your class. NUnit
+ /// will find the and
+ /// of the base class,
+ /// so using them on the and
+ /// method overrides is not strictly required. Any
/// code in these methods is executed within the test framework's control and
/// ensure proper setup has been made. Try not to use static initializers
/// (including complex readonly field initializers). Static initializers are
@@ -977,12 +983,12 @@ public virtual void TearDown()
/// Sets up dependency injection of codec factories for running the test class,
/// and also picks random defaults for culture, time zone, similarity, and default codec.
///
- /// If you override this method, be sure to call base.BeforeClass() BEFORE setting
+ /// If you override this method, be sure to call base.OneTimeSetUp() BEFORE setting
/// up your test fixture.
///
// LUCENENET specific method for setting up dependency injection of test classes.
[OneTimeSetUp]
- public virtual void BeforeClass()
+ public virtual void OneTimeSetUp()
{
try
{
@@ -995,19 +1001,19 @@ public virtual void BeforeClass()
catch (Exception ex)
{
// Write the stack trace so we have something to go on if an error occurs here.
- throw new Exception($"An exception occurred during BeforeClass:\n{ex}", ex);
+ throw new Exception($"An exception occurred during OneTimeSetUp:\n{ex}", ex);
}
}
///
/// Tears down random defaults and cleans up temporary files.
///
- /// If you override this method, be sure to call base.AfterClass() AFTER
+ /// If you override this method, be sure to call base.OneTimeTearDown() AFTER
/// tearing down your test fixture.
///
// LUCENENET specific method for setting up dependency injection of test classes.
[OneTimeTearDown]
- public virtual void AfterClass()
+ public virtual void OneTimeTearDown()
{
try
{
@@ -1017,7 +1023,7 @@ public virtual void AfterClass()
catch (Exception ex)
{
// Write the stack trace so we have something to go on if an error occurs here.
- throw new Exception($"An exception occurred during AfterClass:\n{ex}", ex);
+ throw new Exception($"An exception occurred during OneTimeTearDown:\n{ex}", ex);
}
}
@@ -1029,7 +1035,7 @@ public virtual void AfterClass()
/// Access to the current instance. It is safe to use
/// this method from multiple threads, etc., but it should be called while within a runner's
/// scope (so no static initializers). The returned instance will be
- /// different when this method is called inside a hook (static
+ /// different when this method is called inside a hook (static
/// suite scope) and within / hooks or test methods.
///
/// The returned instance must not be shared with other threads or cross a single scope's
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
index a06ab1290d..9840112734 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
@@ -196,15 +196,15 @@ public bool Apply(object[] args)
}
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
IEnumerable analysisClasses = typeof(StandardAnalyzer).Assembly.GetTypes()
.Where(c => {
var typeInfo = c;
- return !typeInfo.IsAbstract && typeInfo.IsPublic && !typeInfo.IsInterface
+ return !typeInfo.IsAbstract && typeInfo.IsPublic && !typeInfo.IsInterface
&& typeInfo.IsClass && (typeInfo.GetCustomAttribute() is null)
&& (typeInfo.IsSubclassOf(typeof(Tokenizer)) || typeInfo.IsSubclassOf(typeof(TokenFilter)) || typeInfo.IsSubclassOf(typeof(CharFilter)));
})
@@ -225,19 +225,19 @@ public override void BeforeClass()
if (typeInfo.IsSubclassOf(typeof(Tokenizer)))
{
- assertTrue(ctor.ToString() + " has unsupported parameter types",
+ assertTrue(ctor.ToString() + " has unsupported parameter types",
allowedTokenizerArgs.containsAll(ctor.GetParameters().Select(p => p.ParameterType).ToArray()));
tokenizers.Add(ctor);
}
else if (typeInfo.IsSubclassOf(typeof(TokenFilter)))
{
- assertTrue(ctor.ToString() + " has unsupported parameter types",
+ assertTrue(ctor.ToString() + " has unsupported parameter types",
allowedTokenFilterArgs.containsAll(ctor.GetParameters().Select(p => p.ParameterType).ToArray()));
tokenfilters.Add(ctor);
}
else if (typeInfo.IsSubclassOf(typeof(CharFilter)))
{
- assertTrue(ctor.ToString() + " has unsupported parameter types",
+ assertTrue(ctor.ToString() + " has unsupported parameter types",
allowedCharFilterArgs.containsAll(ctor.GetParameters().Select(p => p.ParameterType).ToArray()));
charfilters.Add(ctor);
}
@@ -259,15 +259,15 @@ public override void BeforeClass()
Console.WriteLine("charfilters = " + charfilters);
}
}
-
+
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
tokenizers = null;
tokenfilters = null;
charfilters = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
@@ -1113,7 +1113,7 @@ public override int Read()
return m_input.Read();
}
- // LUCENENET: TextReader dosn't support this overload
+ // LUCENENET: TextReader dosn't support this overload
//public int read(char[] cbuf)
//{
// readSomething = true;
@@ -1214,4 +1214,4 @@ public void TestRandomChainsWithLargeStrings()
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAlternateCasing.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAlternateCasing.cs
index 33294b7173..8b5c306431 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAlternateCasing.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAlternateCasing.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestAlternateCasing : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("alternate-casing.aff", "alternate-casing.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs
index dddd52041c..bdf66497a3 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs
@@ -23,9 +23,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestCaseInsensitive : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init(true, "simple.aff", "mixedcase.dic");
}
@@ -87,4 +87,4 @@ public virtual void TestBogusStems()
AssertStemsTo("solre");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseSensitive.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseSensitive.cs
index fcdd361d58..8fe5bb6298 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseSensitive.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseSensitive.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestCaseSensitive : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("casesensitive.aff", "casesensitive.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs
index c54b741247..499922428d 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs
@@ -23,9 +23,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestCircumfix_ : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("circumfix.aff", "circumfix.dic");
}
@@ -41,4 +41,4 @@ public virtual void TestCircumfix()
AssertStemsTo("legeslegnagy");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs
index 63db496fd7..284826046a 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs
@@ -23,9 +23,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestComplexPrefix : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("complexprefix.aff", "complexprefix.dic");
}
@@ -43,4 +43,4 @@ public virtual void TestPrefixes()
AssertStemsTo("ptwoponefoosuf");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs
index a4e5c945a1..cbd27c9473 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs
@@ -23,9 +23,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestCondition : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("condition.aff", "condition.dic");
}
@@ -46,4 +46,4 @@ public virtual void TestStemming()
AssertStemsTo("helloed");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition2.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition2.cs
index 186f3cacda..3ebc746ec1 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition2.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition2.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestCondition2 : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("condition2.aff", "condition2.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConditionGH418.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConditionGH418.cs
index 5865d8e6ee..f98c274043 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConditionGH418.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConditionGH418.cs
@@ -24,9 +24,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestConditionGH418 : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("condition-issue-418.aff", "condition-issue-418.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs
index 912cb9c4de..3413ac8b77 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs
@@ -23,9 +23,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestConv : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("conv.aff", "conv.dic");
}
[Test]
@@ -38,4 +38,4 @@ public virtual void TestConversion()
AssertStemsTo("drinkABle", "drInk");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs
index cdfd87e334..572903a2c1 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs
@@ -23,11 +23,12 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestDependencies_ : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("dependencies.aff", "dependencies.dic");
}
+
[Test]
public virtual void TestDependencies()
{
@@ -42,4 +43,4 @@ public virtual void TestDependencies()
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDoubleEscape.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDoubleEscape.cs
index c376766ec2..74edafcaa5 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDoubleEscape.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDoubleEscape.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestDoubleEscape : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("double-escaped.aff", "double-escaped.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs
index 4b776949e8..bab567ed78 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs
@@ -23,11 +23,12 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestEscaped : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("escaped.aff", "escaped.dic");
}
+
[Test]
public virtual void TestStemming()
{
@@ -39,4 +40,4 @@ public virtual void TestStemming()
AssertStemsTo("N/As");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs
index 31baf605e9..1b292dba46 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs
@@ -23,11 +23,12 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestFlagLong : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("flaglong.aff", "flaglong.dic");
}
+
[Test]
public virtual void TestLongFlags()
{
@@ -37,4 +38,4 @@ public virtual void TestLongFlags()
AssertStemsTo("foobogus");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs
index b82036d718..e1a2f0ffb8 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs
@@ -23,11 +23,12 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestFlagNum : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("flagnum.aff", "flagnum.dic");
}
+
[Test]
public virtual void TestNumFlags()
{
@@ -36,4 +37,4 @@ public virtual void TestNumFlags()
AssertStemsTo("fooss");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFullStrip.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFullStrip.cs
index 4d66ec3e4f..59b126de4a 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFullStrip.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFullStrip.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestFullStrip : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("fullstrip.aff", "fullstrip.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs
index 272a47ee94..e05cb055fd 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs
@@ -22,17 +22,17 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestHomonyms : StemmerTestBase
{
-
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("homonyms.aff", "homonyms.dic");
}
+
[Test]
public virtual void TestExamples()
{
AssertStemsTo("works", "work", "work");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs
index f1228a0164..1c5b7c5c22 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs
@@ -30,9 +30,9 @@ public class TestHunspellStemFilter : BaseTokenStreamTestCase
private static Dictionary dictionary;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
System.IO.Stream affixStream = typeof(TestStemmer).getResourceAsStream("simple.aff");
System.IO.Stream dictStream = typeof(TestStemmer).getResourceAsStream("simple.dic");
try
@@ -46,10 +46,10 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
dictionary = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
///
@@ -126,4 +126,4 @@ public virtual void TestIgnoreCaseNoSideEffects()
CheckOneTerm(a, "NoChAnGy", "NoChAnGy");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs
index 35fafdbeae..4b3d1264d6 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs
@@ -22,13 +22,13 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestIgnore : StemmerTestBase
{
-
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("ignore.aff", "ignore.dic");
}
+
[Test]
public virtual void TestExamples()
{
@@ -39,4 +39,4 @@ public virtual void TestExamples()
AssertStemsTo("'-'-'-");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestKeepCase.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestKeepCase.cs
index f0a81cc18a..205e97c436 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestKeepCase.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestKeepCase.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestKeepCase : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("keepcase.aff", "keepcase.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs
index 9fccba1b48..70327eab5b 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs
@@ -22,13 +22,13 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestMorph : StemmerTestBase
{
-
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("morph.aff", "morph.dic");
}
+
[Test]
public virtual void TestExamples()
{
@@ -37,4 +37,4 @@ public virtual void TestExamples()
AssertStemsTo("drinkableable");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphAlias.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphAlias.cs
index 20a72588e5..b4c30be56f 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphAlias.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphAlias.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestMorphAlias : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("morphalias.aff", "morphalias.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphData.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphData.cs
index 0978fc37a5..3d28146f99 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphData.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorphData.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestMorphData : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("morphdata.aff", "morphdata.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestNeedAffix.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestNeedAffix.cs
index 8ac9aa7bac..02c821ae79 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestNeedAffix.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestNeedAffix.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestNeedAffix : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("needaffix.aff", "needaffix.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOnlyInCompound.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOnlyInCompound.cs
index d9700aaf84..d2e40d19ba 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOnlyInCompound.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOnlyInCompound.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestOnlyInCompound : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("onlyincompound.aff", "onlyincompound.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOptionalCondition.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOptionalCondition.cs
index 94b9a149c2..b2252b6162 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOptionalCondition.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestOptionalCondition.cs
@@ -23,11 +23,12 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestOptionalCondition : StemmerTestBase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("optional-condition.aff", "condition.dic");
}
+
[Test]
public virtual void TestStemming()
{
@@ -45,4 +46,4 @@ public virtual void TestStemming()
AssertStemsTo("helloed");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestSpaces.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestSpaces.cs
index 2aebb8e6e7..d8c9a4b121 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestSpaces.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestSpaces.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestSpaces : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("spaces.aff", "spaces.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStemmer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStemmer.cs
index 4a5681402b..b695287254 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStemmer.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStemmer.cs
@@ -22,24 +22,26 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestStemmer : StemmerTestBase
{
-
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("simple.aff", "simple.dic");
}
+
[Test]
public virtual void TestSimpleSuffix()
{
AssertStemsTo("lucene", "lucene", "lucen");
AssertStemsTo("mahoute", "mahout");
}
+
[Test]
public virtual void TestSimplePrefix()
{
AssertStemsTo("solr", "olr");
}
+
[Test]
public virtual void TestRecursiveSuffix()
{
@@ -85,4 +87,4 @@ public virtual void TestBogusStems()
AssertStemsTo("solre");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStrangeOvergeneration.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStrangeOvergeneration.cs
index 730d242a18..e0a2c72847 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStrangeOvergeneration.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestStrangeOvergeneration.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestStrangeOvergeneration : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("strange-overgeneration.aff", "strange-overgeneration.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoFold.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoFold.cs
index fdbad8ac93..f6965b305d 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoFold.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoFold.cs
@@ -22,13 +22,13 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestTwoFold : StemmerTestBase
{
-
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("twofold.aff", "morph.dic");
}
+
[Test]
public virtual void TestExamples()
{
@@ -40,4 +40,4 @@ public virtual void TestExamples()
AssertStemsTo("drinks");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoSuffixes.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoSuffixes.cs
index 87495220b7..b7e529dacf 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoSuffixes.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestTwoSuffixes.cs
@@ -22,13 +22,13 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestTwoSuffixes : StemmerTestBase
{
-
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("twosuffixes.aff", "twosuffixes.dic");
}
+
[Test]
public virtual void TestExamples()
{
@@ -39,4 +39,4 @@ public virtual void TestExamples()
AssertStemsTo("drinkss");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix.cs
index e0321554d9..4da61680c2 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestZeroAffix : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("zeroaffix.aff", "zeroaffix.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix2.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix2.cs
index b22f1864d9..edbc81fcb0 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix2.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestZeroAffix2.cs
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Hunspell
public class TestZeroAffix2 : StemmerTestBase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Init("zeroaffix2.aff", "zeroaffix2.dic");
}
diff --git a/src/Lucene.Net.Tests.Analysis.OpenNLP/TestOpenNLPSentenceBreakIterator.cs b/src/Lucene.Net.Tests.Analysis.OpenNLP/TestOpenNLPSentenceBreakIterator.cs
index f5c54f5b11..4e83e035e0 100644
--- a/src/Lucene.Net.Tests.Analysis.OpenNLP/TestOpenNLPSentenceBreakIterator.cs
+++ b/src/Lucene.Net.Tests.Analysis.OpenNLP/TestOpenNLPSentenceBreakIterator.cs
@@ -39,9 +39,9 @@ private const String TEXT
private const String PADDING = " Word. Word. ";
private const String sentenceModelFile = "en-test-sent.bin";
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
PopulateCache();
}
diff --git a/src/Lucene.Net.Tests.Benchmark/BenchmarkTestCase.cs b/src/Lucene.Net.Tests.Benchmark/BenchmarkTestCase.cs
index 15e0edf7a3..de12cf0c5a 100644
--- a/src/Lucene.Net.Tests.Benchmark/BenchmarkTestCase.cs
+++ b/src/Lucene.Net.Tests.Benchmark/BenchmarkTestCase.cs
@@ -31,9 +31,9 @@ public abstract class BenchmarkTestCase : LuceneTestCase
{
private static DirectoryInfo WORKDIR;
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
WORKDIR = CreateTempDir("benchmark");
// LUCENENET: Our directory numbers are sequential. Doing a delete
// here will make threads collide.
@@ -47,10 +47,10 @@ public override void BeforeClass()
};
}
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
WORKDIR = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
@@ -88,7 +88,7 @@ public String getWorkDirPath()
return getWorkDir().FullName.Replace("\\", "/");
}
- // create the benchmark and execute it.
+ // create the benchmark and execute it.
public Benchmark execBenchmark(String[] algLines)
{
String algText = algLinesToText(algLines);
diff --git a/src/Lucene.Net.Tests.Benchmark/ByTask/Tasks/AddIndexesTaskTest.cs b/src/Lucene.Net.Tests.Benchmark/ByTask/Tasks/AddIndexesTaskTest.cs
index 5fea5a5b3e..6bc57725bf 100644
--- a/src/Lucene.Net.Tests.Benchmark/ByTask/Tasks/AddIndexesTaskTest.cs
+++ b/src/Lucene.Net.Tests.Benchmark/ByTask/Tasks/AddIndexesTaskTest.cs
@@ -32,9 +32,9 @@ public class AddIndexesTaskTest : BenchmarkTestCase
{
private static DirectoryInfo testDir, inputDir;
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
testDir = CreateTempDir("addIndexesTask");
// create a dummy index under inputDir
diff --git a/src/Lucene.Net.Tests.Benchmark/ByTask/TestPerfTasksLogic.cs b/src/Lucene.Net.Tests.Benchmark/ByTask/TestPerfTasksLogic.cs
index 3df0078d6d..5e71b00046 100644
--- a/src/Lucene.Net.Tests.Benchmark/ByTask/TestPerfTasksLogic.cs
+++ b/src/Lucene.Net.Tests.Benchmark/ByTask/TestPerfTasksLogic.cs
@@ -49,9 +49,9 @@ public class TestPerfTasksLogic : BenchmarkTestCase
// copyToWorkDir("test-mapping-ISOLatin1Accent-partial.txt");
//}
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
copyToWorkDir("reuters.first20.lines.txt");
copyToWorkDir("test-mapping-ISOLatin1Accent-partial.txt");
}
@@ -85,7 +85,7 @@ public void TestIndexAndSearchTasks()
// 4. test specific checks after the benchmark run completed.
assertEquals("TestSearchTask was supposed to be called!", 279, CountingSearchTestTask.numSearches);
assertTrue("Index does not exist?...!", DirectoryReader.IndexExists(benchmark.RunData.Directory));
- // now we should be able to open the index for write.
+ // now we should be able to open the index for write.
IndexWriter iw = new IndexWriter(benchmark.RunData.Directory,
new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random))
.SetOpenMode(OpenMode.APPEND));
@@ -306,7 +306,7 @@ public void TestExhaustContentSource()
// 4. test specific checks after the benchmark run completed.
assertEquals("TestSearchTask was supposed to be called!", 139, CountingSearchTestTask.numSearches);
assertTrue("Index does not exist?...!", DirectoryReader.IndexExists(benchmark.RunData.Directory));
- // now we should be able to open the index for write.
+ // now we should be able to open the index for write.
IndexWriter iw = new IndexWriter(benchmark.RunData.Directory, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random)).SetOpenMode(OpenMode.APPEND));
iw.Dispose();
IndexReader ir = DirectoryReader.Open(benchmark.RunData.Directory);
@@ -419,7 +419,7 @@ public void TestLineDocFile()
{
if (numLines == 0 && line.StartsWith(WriteLineDocTask.FIELDS_HEADER_INDICATOR, StringComparison.Ordinal))
{
- continue; // do not count the header line as a doc
+ continue; // do not count the header line as a doc
}
numLines++;
}
@@ -445,7 +445,7 @@ public void TestLineDocFile()
// Run algo
benchmark = execBenchmark(algLines2);
- // now we should be able to open the index for write.
+ // now we should be able to open the index for write.
IndexWriter iw = new IndexWriter(benchmark.RunData.Directory,
new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random))
.SetOpenMode(OpenMode.APPEND));
@@ -964,7 +964,7 @@ public void TestLocale()
benchmark = execBenchmark(getLocaleConfig("ROOT"));
assertEquals(CultureInfo.InvariantCulture, benchmark.RunData.Locale);
- // specify just a language
+ // specify just a language
benchmark = execBenchmark(getLocaleConfig("de"));
assertEquals(new CultureInfo("de"), benchmark.RunData.Locale);
@@ -976,7 +976,7 @@ public void TestLocale()
//benchmark = execBenchmark(getLocaleConfig("no,NO,NY"));
//assertEquals(new CultureInfo("no-NO"/*, "NY"*/), benchmark.RunData.Locale);
- // LUCENENET specific - in .NET Norwegian is specified as either nb-NO (Bokmål) or
+ // LUCENENET specific - in .NET Norwegian is specified as either nb-NO (Bokmål) or
// nn-NO (Nynorsk) + a few other dialects. no-NO works sometimes, but is not
// supported across all OS's, so doesn't make a reliable test case.
benchmark = execBenchmark(getLocaleConfig("nb,NO,NY"));
@@ -1035,7 +1035,7 @@ public void TestCollator()
//expected = new ICUCollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.Create(new CultureInfo("no-NO"/*, "NY"*/), Collator.Fallback.FallbackAllowed));
//assertEqualCollation(expected, benchmark.RunData.Analyzer, "foobar");
- // LUCENENET specific - in .NET Norwegian is specified as either nb-NO (Bokmål) or
+ // LUCENENET specific - in .NET Norwegian is specified as either nb-NO (Bokmål) or
// nn-NO (Nynorsk) + a few other dialects. no-NO works sometimes, but is not
// supported across all OS's, so doesn't make a reliable test case.
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs
index c113719ab9..359afb2075 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs
@@ -36,7 +36,7 @@ namespace Lucene.Net.Facet.Taxonomy
using IOUtils = Lucene.Net.Util.IOUtils;
///
- /// Test for associations
+ /// Test for associations
///
[TestFixture]
public class TestTaxonomyFacetAssociations : FacetTestCase
@@ -48,14 +48,10 @@ public class TestTaxonomyFacetAssociations : FacetTestCase
private static FacetsConfig config;
- ///
- /// LUCENENET specific
- /// Is non-static because Similarity and TimeZone are not static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = NewDirectory();
taxoDir = NewDirectory();
@@ -98,7 +94,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
reader = null;
@@ -109,7 +105,7 @@ public override void AfterClass()
taxoDir.Dispose();
taxoDir = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
@@ -144,7 +140,7 @@ public virtual void TestFloatSumAssociation()
///
/// Make sure we can test both int and float assocs in one
- /// index, as long as we send each to a different field.
+ /// index, as long as we send each to a different field.
///
[Test]
public virtual void TestIntAndFloatAssocation()
@@ -163,7 +159,7 @@ public virtual void TestIntAndFloatAssocation()
Assert.AreEqual(150, (int)facets.GetSpecificValue("int", "b"), "Wrong count for category 'b'!");
}
-
+
[Test]
public virtual void TestWrongIndexFieldName()
{
@@ -284,4 +280,4 @@ public virtual void TestIntSumAssociationDrillDown()
Assert.AreEqual(150, (int)facets.GetSpecificValue("int", "b"), "Wrong count for category 'b'!");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts2.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts2.cs
index c7d1c5aa8c..74bbed9d73 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts2.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts2.cs
@@ -88,10 +88,10 @@ static TestTaxonomyFacetCounts2()
private static IDictionary allExpectedCounts, termExpectedCounts;
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - renamed from AfterClassCountingFacetsAggregatorTest() to ensure calling order
+ public override void OneTimeTearDown() // LUCENENET specific - renamed from AfterClassCountingFacetsAggregatorTest() to ensure calling order
{
IOUtils.Dispose(indexDir, taxoDir);
- base.AfterClass();
+ base.OneTimeTearDown();
}
private static IList RandomCategories(Random random)
@@ -246,9 +246,9 @@ private static IDictionary newCounts()
}
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from BeforeClassCountingFacetsAggregatorTest() to ensure calling order
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from BeforeClassCountingFacetsAggregatorTest() to ensure calling order
{
- base.BeforeClass();
+ base.OneTimeSetUp();
indexDir = NewDirectory();
taxoDir = NewDirectory();
@@ -401,4 +401,4 @@ public virtual void TestNoParents()
IOUtils.Dispose(indexReader, taxoReader);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Facet/TestDrillDownQuery.cs b/src/Lucene.Net.Tests.Facet/TestDrillDownQuery.cs
index 34d1c42f47..4abeec81c5 100644
--- a/src/Lucene.Net.Tests.Facet/TestDrillDownQuery.cs
+++ b/src/Lucene.Net.Tests.Facet/TestDrillDownQuery.cs
@@ -55,7 +55,7 @@ public class TestDrillDownQuery : FacetTestCase
private static FacetsConfig config;
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - renamed from AfterClassDrillDownQueryTest() to ensure calling order
+ public override void OneTimeTearDown() // LUCENENET specific - renamed from AfterClassDrillDownQueryTest() to ensure calling order
{
IOUtils.Dispose(reader, taxo, dir, taxoDir);
reader = null;
@@ -64,13 +64,13 @@ public override void AfterClass() // LUCENENET specific - renamed from AfterClas
taxoDir = null;
config = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from BeforeClassDrillDownQueryTest() to ensure calling order
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from BeforeClassDrillDownQueryTest() to ensure calling order
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = NewDirectory();
Random r = Random;
@@ -174,7 +174,7 @@ public virtual void TestQuery()
Assert.AreEqual(5, docs.TotalHits);
// Check that content:foo (which yields 50% results) and facet/b (which yields 20%)
- // would gather together 10 results (10%..)
+ // would gather together 10 results (10%..)
Query fooQuery = new TermQuery(new Term("content", "foo"));
DrillDownQuery q4 = new DrillDownQuery(config, fooQuery);
q4.Add("b");
@@ -199,7 +199,7 @@ public virtual void TestQueryImplicitDefaultParams()
Assert.AreEqual(5, docs.TotalHits);
// Check that content:foo (which yields 50% results) and facet/b (which yields 20%)
- // would gather together 10 results (10%..)
+ // would gather together 10 results (10%..)
Query fooQuery = new TermQuery(new Term("content", "foo"));
DrillDownQuery q4 = new DrillDownQuery(config, fooQuery);
q4.Add("b");
@@ -280,4 +280,4 @@ public virtual void TestNoDrillDown()
Assert.AreSame(@base, rewrite);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests.Misc/Document/TestLazyDocument.cs b/src/Lucene.Net.Tests.Misc/Document/TestLazyDocument.cs
index f30cf81e50..43d0b33088 100644
--- a/src/Lucene.Net.Tests.Misc/Document/TestLazyDocument.cs
+++ b/src/Lucene.Net.Tests.Misc/Document/TestLazyDocument.cs
@@ -44,7 +44,7 @@ public class TestLazyDocument : LuceneTestCase
public Directory dir = NewDirectory();
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - changed from RemoveIndex() to ensure calling order vs base class
+ public override void OneTimeTearDown() // LUCENENET specific - changed from RemoveIndex() to ensure calling order vs base class
{
if (null != dir)
{
@@ -56,13 +56,13 @@ public override void AfterClass() // LUCENENET specific - changed from RemoveInd
catch (Exception e) when (e.IsException()) { /* NOOP */ }
}
- base.AfterClass();
+ base.OneTimeTearDown();
}
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - changed from CreateIndex() to ensure calling order vs base class
+ public override void OneTimeSetUp() // LUCENENET specific - changed from CreateIndex() to ensure calling order vs base class
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Analyzer analyzer = new MockAnalyzer(Random);
IndexWriter writer = new IndexWriter
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
index 9f525b23db..2bd75ecf10 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
@@ -36,9 +36,9 @@ public class IndexSortingTest : SorterTestBase
};
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from BeforeClassSorterUtilTest() to ensure calling order vs base class
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from BeforeClassSorterUtilTest() to ensure calling order vs base class
{
- base.BeforeClass();
+ base.OneTimeSetUp();
// only read the values of the undeleted documents, since after addIndexes,
// the deleted ones will be dropped from the index.
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
index 5f20de1d42..1695df2975 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
@@ -207,9 +207,9 @@ public void CreateIndex(Directory dir, int numDocs, Random random)
}
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from BeforeClassSorterTestBase() to ensure calling order vs base class
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from BeforeClassSorterTestBase() to ensure calling order vs base class
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = NewDirectory();
int numDocs = AtLeast(20);
@@ -219,12 +219,12 @@ public override void BeforeClass() // LUCENENET specific - renamed from BeforeCl
}
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - renamed from AfterClassSorterTestBase() to ensure calling order vs base class
+ public override void OneTimeTearDown() // LUCENENET specific - renamed from AfterClassSorterTestBase() to ensure calling order vs base class
{
reader.Dispose();
dir.Dispose();
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
index 9a734de61e..678c5ad189 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
@@ -27,9 +27,9 @@ namespace Lucene.Net.Index.Sorter
public class SortingAtomicReaderTest : SorterTestBase
{
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from BeforeClassSortingAtomicReaderTest() to ensure calling order vs base class
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from BeforeClassSortingAtomicReaderTest() to ensure calling order vs base class
{
- base.BeforeClass();
+ base.OneTimeSetUp();
// sort the index by id (as integer, in NUMERIC_DV_FIELD)
Sort sort = new Sort(new SortField(NUMERIC_DV_FIELD, SortFieldType.INT32));
diff --git a/src/Lucene.Net.Tests.Misc/Misc/TestHighFreqTerms.cs b/src/Lucene.Net.Tests.Misc/Misc/TestHighFreqTerms.cs
index 65ab7d4e14..5db6002135 100644
--- a/src/Lucene.Net.Tests.Misc/Misc/TestHighFreqTerms.cs
+++ b/src/Lucene.Net.Tests.Misc/Misc/TestHighFreqTerms.cs
@@ -38,9 +38,9 @@ public class TestHighFreqTerms : LuceneTestCase
private static IndexReader reader = null;
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from SetUpClass() to ensure calling order vs base class
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from SetUpClass() to ensure calling order vs base class
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = NewDirectory();
writer = new IndexWriter(dir, NewIndexWriterConfig(Random,
@@ -52,7 +52,7 @@ public override void BeforeClass() // LUCENENET specific - renamed from SetUpCla
}
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - renamed from TearDownClass() to ensure calling order vs base class
+ public override void OneTimeTearDown() // LUCENENET specific - renamed from TearDownClass() to ensure calling order vs base class
{
reader.Dispose();
dir.Dispose();
@@ -60,7 +60,7 @@ public override void AfterClass() // LUCENENET specific - renamed from TearDownC
reader = null;
writer = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
/******************** Tests for getHighFreqTerms **********************************/
@@ -231,7 +231,7 @@ private void IndexDocs(IndexWriter writer)
Random rnd = Random;
/**
- * Generate 10 documents where term n has a docFreq of n and a totalTermFreq of n*2 (squared).
+ * Generate 10 documents where term n has a docFreq of n and a totalTermFreq of n*2 (squared).
*/
for (int i = 1; i <= 10; i++)
{
@@ -294,7 +294,7 @@ private void IndexDocs(IndexWriter writer)
/**
* getContent
* return string containing numbers 1 to i with each number n occurring n times.
- * i.e. for input of 3 return string "3 3 3 2 2 1"
+ * i.e. for input of 3 return string "3 3 3 2 2 1"
*/
private static string GetContent(int i)
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
index 223785d4c8..9ddce61c08 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
@@ -48,17 +48,17 @@ public class TestPrecedenceQueryParser : LuceneTestCase
public static Analyzer qpAnalyzer;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
qpAnalyzer = new QPTestAnalyzer();
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
qpAnalyzer = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
public sealed class QPTestFilter : TokenFilter
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestNumericQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestNumericQueryParser.cs
index bfb740b7c5..f3b21199f4 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestNumericQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestNumericQueryParser.cs
@@ -61,7 +61,7 @@ public enum NumberType
private static Analyzer? ANALYZER;
private static NumberFormat? NUMBER_FORMAT;
-
+
private static StandardQueryParser? qp;
@@ -131,9 +131,9 @@ internal static Calendar GetCalendar(IFormatProvider? provider)
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
ANALYZER = new MockAnalyzer(Random);
@@ -260,7 +260,7 @@ public override void BeforeClass()
continue;
}
- numericConfigMap[type.ToString()] = new NumericConfig(PRECISION_STEP, NUMBER_FORMAT, type);
+ numericConfigMap[type.ToString()] = new NumericConfig(PRECISION_STEP, NUMBER_FORMAT, type);
FieldType ft2 = new FieldType(Int32Field.TYPE_NOT_STORED);
ft2.NumericType = (type);
@@ -663,7 +663,7 @@ private static String NumberToString(/*Number*/ object? number)
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader?.Dispose();
@@ -672,7 +672,7 @@ public override void AfterClass()
directory = null;
qp = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
}
}
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestQPHelper.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestQPHelper.cs
index 9346907fc6..13448ef3df 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestQPHelper.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Standard/TestQPHelper.cs
@@ -42,7 +42,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard
///
/// This test case is a copy of the core Lucene query parser test, it was adapted
/// to use new QueryParserHelper instead of the old query parser.
- ///
+ ///
/// Tests QueryParser.
///
// TODO: really this should extend QueryParserTestBase too!
@@ -51,17 +51,17 @@ public class TestQPHelper : LuceneTestCase
public static Analyzer qpAnalyzer;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
qpAnalyzer = new QPTestAnalyzer();
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
qpAnalyzer = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
public sealed class QPTestFilter : TokenFilter
@@ -801,7 +801,7 @@ public void TestDateRange()
IDictionary dateRes = new Dictionary();
- // set a field specific date resolution
+ // set a field specific date resolution
dateRes[monthField] = DateResolution.MONTH;
#pragma warning disable 612, 618
qp.SetDateResolution(dateRes);
@@ -851,7 +851,7 @@ public void TestEscaped()
* assertQueryEquals("\\[brackets", null, "brackets");
* assertQueryEquals("\\\\", a, "\\\\"); assertQueryEquals("\\+blah", a,
* "\\+blah"); assertQueryEquals("\\(blah", a, "\\(blah");
- *
+ *
* assertQueryEquals("\\-blah", a, "\\-blah"); assertQueryEquals("\\!blah",
* a, "\\!blah"); assertQueryEquals("\\{blah", a, "\\{blah");
* assertQueryEquals("\\}blah", a, "\\}blah"); assertQueryEquals("\\:blah",
diff --git a/src/Lucene.Net.Tests.QueryParser/Support/Flexible/Core/Messages/TestQueryParserMessagesOverridden.cs b/src/Lucene.Net.Tests.QueryParser/Support/Flexible/Core/Messages/TestQueryParserMessagesOverridden.cs
index f80a8e841e..ea686a9dff 100644
--- a/src/Lucene.Net.Tests.QueryParser/Support/Flexible/Core/Messages/TestQueryParserMessagesOverridden.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Support/Flexible/Core/Messages/TestQueryParserMessagesOverridden.cs
@@ -25,21 +25,21 @@ namespace Lucene.Net.QueryParsers.Support.Flexible.Core.Messages
public class TestQueryParserMessagesOverridden : LuceneTestCase
{
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
var provider = new QueryParserResourceProvider(MessagesTest.ResourceManager);
QueryParserMessages.SetResourceProvider(provider);
}
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
// Return to the default
var provider = new QueryParserResourceProvider();
QueryParserMessages.SetResourceProvider(provider);
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs b/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
index 21cc3e1b77..0b7c025d16 100644
--- a/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Util/QueryParserTestBase.cs
@@ -39,7 +39,7 @@ namespace Lucene.Net.QueryParsers.Util
{
///
/// In .NET the abstact members were moved to AbstractQueryParserTestBase
- /// because the Visual Studio test runner does not find or run tests in
+ /// because the Visual Studio test runner does not find or run tests in
/// abstract classes.
///
[TestFixture]
@@ -48,17 +48,17 @@ public abstract class QueryParserTestBase : LuceneTestCase
public static Analyzer qpAnalyzer;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
qpAnalyzer = new QPTestAnalyzer();
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
qpAnalyzer = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
public sealed class QPTestFilter : TokenFilter
@@ -675,7 +675,7 @@ private string GetDate(string s, DateResolution resolution)
{
// we use the default Locale since LuceneTestCase randomizes it
DateTime d = DateTime.ParseExact(s, CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern, CultureInfo.CurrentCulture);
- return GetDate(d, resolution);
+ return GetDate(d, resolution);
}
/// for testing DateTools support
@@ -729,7 +729,7 @@ public virtual void TestDateRange()
// set default date resolution to MILLISECOND
qp.SetDateResolution(DateResolution.MILLISECOND);
- // set second field specific date resolution
+ // set second field specific date resolution
SetDateResolution(qp, hourField, DateResolution.HOUR);
// for this field no field specific date resolution has been set,
@@ -834,7 +834,7 @@ public virtual void TestEscaped()
// Tests bug LUCENE-800
AssertQueryEquals("(item:\\\\ item:ABCD\\\\)", a, "item:\\ item:ABCD\\");
- AssertParseException("(item:\\\\ item:ABCD\\\\))"); // unmatched closing paranthesis
+ AssertParseException("(item:\\\\ item:ABCD\\\\))"); // unmatched closing paranthesis
AssertQueryEquals("\\*", a, "*");
AssertQueryEquals("\\\\", a, "\\"); // escaped backslash
diff --git a/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs b/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs
index c759ddc003..5bb9c16dc6 100644
--- a/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Xml/TestParser.cs
@@ -38,9 +38,9 @@ public class TestParser : LuceneTestCase
private static IndexSearcher searcher;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
// TODO: rewrite test (this needs to set QueryParser.enablePositionIncrements, too, for work with CURRENT):
Analyzer analyzer = new MockAnalyzer(Random, MockTokenizer.WHITESPACE, true, MockTokenFilter.ENGLISH_STOPSET);
@@ -71,7 +71,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
dir.Dispose();
@@ -79,7 +79,7 @@ public override void AfterClass()
searcher = null;
dir = null;
builder = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests.Sandbox/Queries/TestSortedSetSortFieldSelectors.cs b/src/Lucene.Net.Tests.Sandbox/Queries/TestSortedSetSortFieldSelectors.cs
index d1120cf350..90ad9c2284 100644
--- a/src/Lucene.Net.Tests.Sandbox/Queries/TestSortedSetSortFieldSelectors.cs
+++ b/src/Lucene.Net.Tests.Sandbox/Queries/TestSortedSetSortFieldSelectors.cs
@@ -37,9 +37,9 @@ public class TestSortedSetSortFieldSelectors : LuceneTestCase
static Codec savedCodec;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
savedCodec = Codec.Default;
// currently only these codecs that support random access ordinals
@@ -53,11 +53,11 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
- Codec.Default = (savedCodec);
+ Codec.Default = savedCodec;
- base.AfterClass();
+ base.OneTimeTearDown();
}
public override void SetUp()
diff --git a/src/Lucene.Net.Tests.TestFramework/Configuration/TestConfigurationSettings.cs b/src/Lucene.Net.Tests.TestFramework/Configuration/TestConfigurationSettings.cs
index 9fa28e64c1..5e4584584c 100644
--- a/src/Lucene.Net.Tests.TestFramework/Configuration/TestConfigurationSettings.cs
+++ b/src/Lucene.Net.Tests.TestFramework/Configuration/TestConfigurationSettings.cs
@@ -38,10 +38,8 @@ internal class TestConfigurationSettings : ConfigurationSettingsTestCase
private readonly static string currentJsonFilePath = Path.Combine(testDirectory, TestJsonFileName);
private readonly static string parentJsonFilePath = Path.Combine(parentDirectory, TestJsonFileName);
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
-
-
// Create directories if they do not exist
Directory.CreateDirectory(testDirectory);
@@ -65,10 +63,10 @@ public override void BeforeClass()
string testValue = "setup";
Environment.SetEnvironmentVariable(testKey, testValue);
- base.BeforeClass();
+ base.OneTimeSetUp();
}
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
DirectoryInfo dir = null;
@@ -110,7 +108,7 @@ public override void AfterClass()
}
catch { }
- base.AfterClass();
+ base.OneTimeTearDown();
}
private static readonly IConfigurationFactory ConfigurationFactory = new TestConfigurationFactory
diff --git a/src/Lucene.Net.Tests.TestFramework/Configuration/TestSystemProperties.cs b/src/Lucene.Net.Tests.TestFramework/Configuration/TestSystemProperties.cs
index 2858b91855..d79f9bdf19 100644
--- a/src/Lucene.Net.Tests.TestFramework/Configuration/TestSystemProperties.cs
+++ b/src/Lucene.Net.Tests.TestFramework/Configuration/TestSystemProperties.cs
@@ -36,7 +36,7 @@ public class TestSystemProperties : ConfigurationSettingsTestCase
private readonly static string currentJsonFilePath = Path.Combine(testDirectory, TestJsonFileName);
private readonly static string parentJsonFilePath = Path.Combine(parentDirectory, TestJsonFileName);
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
// Create directories if they do not exist
Directory.CreateDirectory(testDirectory);
@@ -55,10 +55,10 @@ public override void BeforeClass()
input.CopyTo(output);
}
- base.BeforeClass();
+ base.OneTimeSetUp();
}
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
DirectoryInfo dir = null;
@@ -100,7 +100,7 @@ public override void AfterClass()
}
catch { }
- base.AfterClass();
+ base.OneTimeTearDown();
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs b/src/Lucene.Net.Tests/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
index f53f3eb2ae..9b0d59c783 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
@@ -25,9 +25,9 @@ namespace Lucene.Net.Codecs.Lucene3x
public class TestLucene3xStoredFieldsFormat : BaseStoredFieldsFormatTestCase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
@@ -45,4 +45,4 @@ public override void TestWriteReadMerge()
// and merge into newly formed 3.x segments.
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene3x/TestSurrogates.cs b/src/Lucene.Net.Tests/Codecs/Lucene3x/TestSurrogates.cs
index 90f89bfde7..215046485d 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene3x/TestSurrogates.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene3x/TestSurrogates.cs
@@ -38,9 +38,9 @@ public class TestSurrogates : LuceneTestCase
/// we will manually instantiate preflex-rw here
///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true;
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene3x/TestTermInfosReaderIndex.cs b/src/Lucene.Net.Tests/Codecs/Lucene3x/TestTermInfosReaderIndex.cs
index df24ac6e11..dd759cef18 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene3x/TestTermInfosReaderIndex.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene3x/TestTermInfosReaderIndex.cs
@@ -74,9 +74,9 @@ public class TestTermInfosReaderIndex : LuceneTestCase
/// we will manually instantiate preflex-rw here
///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
// NOTE: turn off compound file, this test will open some index files directly.
OldFormatImpersonationIsActive = true;
@@ -121,7 +121,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
termEnum.Dispose();
reader.Dispose();
@@ -131,7 +131,7 @@ public override void AfterClass()
directory = null;
index = null;
sampleTerms = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40DocValuesFormat.cs b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
index fef438318b..00becccc2f 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
@@ -30,9 +30,9 @@ public class TestLucene40DocValuesFormat : BaseDocValuesFormatTestCase
private readonly Codec codec = new Lucene40RWCodec();
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsFormat.cs b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsFormat.cs
index ad3d5810fd..3bf0d4f853 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsFormat.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsFormat.cs
@@ -30,9 +30,9 @@ public class TestLucene40PostingsFormat : BasePostingsFormatTestCase
private readonly Codec codec = new Lucene40RWCodec();
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsReader.cs b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsReader.cs
index 922dd547c0..442e33f66e 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsReader.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40PostingsReader.cs
@@ -60,9 +60,9 @@ static string[] LoadTerms()
}
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
index d3d07753e6..f97a123f67 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
@@ -25,9 +25,9 @@ namespace Lucene.Net.Codecs.Lucene40
public class TestLucene40StoredFieldsFormat : BaseStoredFieldsFormatTestCase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
index 011fb385ea..dec408156d 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
@@ -25,9 +25,9 @@ namespace Lucene.Net.Codecs.Lucene40
public class TestLucene40TermVectorsFormat : BaseTermVectorsFormatTestCase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene40/TestReuseDocsEnum.cs b/src/Lucene.Net.Tests/Codecs/Lucene40/TestReuseDocsEnum.cs
index ff23c4127f..fd4a235692 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene40/TestReuseDocsEnum.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene40/TestReuseDocsEnum.cs
@@ -52,9 +52,9 @@ namespace Lucene.Net.Codecs.Lucene40
public class TestReuseDocsEnum : LuceneTestCase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs b/src/Lucene.Net.Tests/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
index 0c9275fe73..5df16298c7 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
@@ -25,9 +25,9 @@ namespace Lucene.Net.Codecs.Lucene41
public class TestLucene41StoredFieldsFormat : BaseStoredFieldsFormatTestCase
{
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Codecs/Lucene42/TestLucene42DocValuesFormat.cs b/src/Lucene.Net.Tests/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
index 8d39a581e0..114f20ccc8 100644
--- a/src/Lucene.Net.Tests/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
@@ -30,9 +30,9 @@ public class TestLucene42DocValuesFormat : BaseCompressingDocValuesFormatTestCas
private readonly Codec codec = new Lucene42RWCodec();
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
OldFormatImpersonationIsActive = true; // explicitly instantiates ancient codec
}
diff --git a/src/Lucene.Net.Tests/Index/Test2BDocs.cs b/src/Lucene.Net.Tests/Index/Test2BDocs.cs
index aa689a6022..76ba91c9db 100644
--- a/src/Lucene.Net.Tests/Index/Test2BDocs.cs
+++ b/src/Lucene.Net.Tests/Index/Test2BDocs.cs
@@ -32,9 +32,9 @@ public class Test2BDocs : LuceneTestCase
internal static Directory dir;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = NewFSDirectory(CreateTempDir("2Bdocs"));
IndexWriter iw = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, null));
@@ -48,11 +48,11 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
dir.Dispose();
dir = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs
index ad0cf561c9..4989ce80ea 100644
--- a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs
+++ b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs
@@ -218,9 +218,9 @@ private static IndexUpgrader NewIndexUpgrader(Directory dir)
}
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Assert.IsFalse(OldFormatImpersonationIsActive, "test infra is broken!");
JCG.List names = new JCG.List(oldNames.Length + oldSingleSegmentNames.Length);
@@ -239,14 +239,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
foreach (Directory d in oldIndexDirs.Values)
{
d.Dispose();
}
oldIndexDirs = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
///
diff --git a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs
index fbeb4a0c8f..336580ff9e 100644
--- a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs
+++ b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs
@@ -148,9 +148,9 @@ public void testCreateSingleSegmentNoCFS() throws IOException {
internal static IDictionary oldIndexDirs;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
assertFalse("test infra is broken!", OldFormatImpersonationIsActive);
JCG.List names = new JCG.List(oldNames.Length + oldSingleSegmentNames.Length);
@@ -169,14 +169,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
foreach (Directory d in oldIndexDirs.Values)
{
d.Dispose();
}
oldIndexDirs = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
///
diff --git a/src/Lucene.Net.Tests/Index/TestCodecs.cs b/src/Lucene.Net.Tests/Index/TestCodecs.cs
index 7e090a0c18..411d878e5c 100644
--- a/src/Lucene.Net.Tests/Index/TestCodecs.cs
+++ b/src/Lucene.Net.Tests/Index/TestCodecs.cs
@@ -92,9 +92,9 @@ public class TestCodecs : LuceneTestCase
private const int TERM_DOC_FREQ_RAND = 20;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
NUM_TEST_ITER = AtLeast(20);
}
diff --git a/src/Lucene.Net.Tests/Index/TestFieldsReader.cs b/src/Lucene.Net.Tests/Index/TestFieldsReader.cs
index 23c6030f1a..feb5cb3bf5 100644
--- a/src/Lucene.Net.Tests/Index/TestFieldsReader.cs
+++ b/src/Lucene.Net.Tests/Index/TestFieldsReader.cs
@@ -45,9 +45,9 @@ public class TestFieldsReader : LuceneTestCase
private static FieldInfos.Builder fieldInfos = null;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
testDoc = new Document();
fieldInfos = new FieldInfos.Builder();
@@ -66,13 +66,13 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
dir.Dispose();
dir = null;
fieldInfos = null;
testDoc = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs b/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs
index ad49c21b04..ae61c4a7ec 100644
--- a/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs
+++ b/src/Lucene.Net.Tests/Index/TestFlushByRamOrCountsPolicy.cs
@@ -48,18 +48,18 @@ public class TestFlushByRamOrCountsPolicy : LuceneTestCase
private static LineFileDocs lineDocFile;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
lineDocFile = new LineFileDocs(Random, DefaultCodecSupportsDocValues);
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
lineDocFile.Dispose();
lineDocFile = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Index/TestIndexInput.cs b/src/Lucene.Net.Tests/Index/TestIndexInput.cs
index e4c9228e3a..2d0ada12ca 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexInput.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexInput.cs
@@ -45,13 +45,13 @@ public class TestIndexInput : LuceneTestCase
(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0x7F,
0x06, (byte) 'L', (byte) 'u', (byte) 'c', (byte) 'e', (byte) 'n', (byte) 'e',
- // 2-byte UTF-8 (U+00BF "INVERTED QUESTION MARK")
+ // 2-byte UTF-8 (U+00BF "INVERTED QUESTION MARK")
0x02, (byte) 0xC2, (byte) 0xBF,
0x0A, (byte) 'L', (byte) 'u', (byte) 0xC2, (byte) 0xBF,
(byte) 'c', (byte) 'e', (byte) 0xC2, (byte) 0xBF,
(byte) 'n', (byte) 'e',
- // 3-byte UTF-8 (U+2620 "SKULL AND CROSSBONES")
+ // 3-byte UTF-8 (U+2620 "SKULL AND CROSSBONES")
0x03, (byte) 0xE2, (byte) 0x98, (byte) 0xA0,
0x0C, (byte) 'L', (byte) 'u', (byte) 0xE2, (byte) 0x98, (byte) 0xA0,
(byte) 'c', (byte) 'e', (byte) 0xE2, (byte) 0x98, (byte) 0xA0,
@@ -67,12 +67,12 @@ public class TestIndexInput : LuceneTestCase
(byte) 0xF0, (byte) 0x9D, (byte) 0x84, (byte) 0x9E,
(byte) 'c', (byte) 'e',
(byte) 0xF0, (byte) 0x9D, (byte) 0x85, (byte) 0xA0,
- (byte) 'n', (byte) 'e',
+ (byte) 'n', (byte) 'e',
// null bytes
0x01, 0x00,
0x08, (byte) 'L', (byte) 'u', 0x00, (byte) 'c', (byte) 'e', 0x00, (byte) 'n', (byte) 'e',
-
+
// tests for Exceptions on invalid values
(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0x17,
(byte) 0x01, // guard value
@@ -86,9 +86,9 @@ public class TestIndexInput : LuceneTestCase
internal static byte[] RANDOM_TEST_BYTES;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
Random random = Random;
INTS = new int[COUNT];
@@ -117,12 +117,12 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
INTS = null;
LONGS = null;
RANDOM_TEST_BYTES = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
private void CheckReads(DataInput @is, Type expectedEx)
@@ -229,4 +229,4 @@ public virtual void TestByteArrayDataInput()
CheckRandomReads(@is);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
index e54ed5c0b6..c9fb51f418 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
@@ -280,10 +280,10 @@ public override void Run()
internal DisposableThreadLocal doFail = new DisposableThreadLocal();
// LUCENENET specific - cleanup DisposableThreadLocal instances after running tests
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
doFail.Dispose();
- base.AfterClass();
+ base.OneTimeTearDown();
}
private class TestPoint1 : ITestPoint
diff --git a/src/Lucene.Net.Tests/Search/BaseTestRangeFilter.cs b/src/Lucene.Net.Tests/Search/BaseTestRangeFilter.cs
index 1829f6150f..ca39069480 100644
--- a/src/Lucene.Net.Tests/Search/BaseTestRangeFilter.cs
+++ b/src/Lucene.Net.Tests/Search/BaseTestRangeFilter.cs
@@ -98,9 +98,9 @@ public static string Pad(int n)
}
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific: renamed from BeforeClassBaseTestRangeFilter() so we can override to control the order of execution
+ public override void OneTimeSetUp() // LUCENENET specific: renamed from BeforeClassBaseTestRangeFilter() so we can override to control the order of execution
{
- base.BeforeClass();
+ base.OneTimeSetUp();
maxId = AtLeast(500);
signedIndexDir = new TestIndex(Random, int.MaxValue, int.MinValue, true);
@@ -110,7 +110,7 @@ public override void BeforeClass() // LUCENENET specific: renamed from BeforeCla
}
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific: renamed from AfterClassBaseTestRangeFilter() so we can override to control the order of execution
+ public override void OneTimeTearDown() // LUCENENET specific: renamed from AfterClassBaseTestRangeFilter() so we can override to control the order of execution
{
signedIndexReader?.Dispose();
unsignedIndexReader?.Dispose();
@@ -120,7 +120,7 @@ public override void AfterClass() // LUCENENET specific: renamed from AfterClass
unsignedIndexReader = null;
signedIndexDir = null;
unsignedIndexDir = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
private static IndexReader Build(Random random, TestIndex index)
diff --git a/src/Lucene.Net.Tests/Search/Payloads/TestPayloadNearQuery.cs b/src/Lucene.Net.Tests/Search/Payloads/TestPayloadNearQuery.cs
index 5998c78ffb..8bc77f2d2a 100644
--- a/src/Lucene.Net.Tests/Search/Payloads/TestPayloadNearQuery.cs
+++ b/src/Lucene.Net.Tests/Search/Payloads/TestPayloadNearQuery.cs
@@ -115,9 +115,9 @@ private PayloadNearQuery NewPhraseQuery(string fieldName, string phrase, bool in
}
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory,
@@ -140,14 +140,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader.Dispose();
reader = null;
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Search/Payloads/TestPayloadTermQuery.cs b/src/Lucene.Net.Tests/Search/Payloads/TestPayloadTermQuery.cs
index 7f499ac532..377c43b593 100644
--- a/src/Lucene.Net.Tests/Search/Payloads/TestPayloadTermQuery.cs
+++ b/src/Lucene.Net.Tests/Search/Payloads/TestPayloadTermQuery.cs
@@ -122,9 +122,9 @@ public override void Reset()
}
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory,
@@ -149,14 +149,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader.Dispose();
reader = null;
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Search/Spans/TestBasics.cs b/src/Lucene.Net.Tests/Search/Spans/TestBasics.cs
index f68dbaec1f..d54678ae93 100644
--- a/src/Lucene.Net.Tests/Search/Spans/TestBasics.cs
+++ b/src/Lucene.Net.Tests/Search/Spans/TestBasics.cs
@@ -97,14 +97,10 @@ public override void Reset()
internal static Analyzer simplePayloadAnalyzer;
- ///
- /// LUCENENET specific
- /// Is non-static because NewIndexWriterConfig is no longer static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
simplePayloadAnalyzer = Analyzer.NewAnonymous(createComponents: (fieldName, reader2) =>
{
@@ -129,7 +125,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
directory.Dispose();
@@ -137,7 +133,7 @@ public override void AfterClass()
reader = null;
directory = null;
simplePayloadAnalyzer = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Search/Spans/TestFieldMaskingSpanQuery.cs b/src/Lucene.Net.Tests/Search/Spans/TestFieldMaskingSpanQuery.cs
index 875571a6d9..1492bc2393 100644
--- a/src/Lucene.Net.Tests/Search/Spans/TestFieldMaskingSpanQuery.cs
+++ b/src/Lucene.Net.Tests/Search/Spans/TestFieldMaskingSpanQuery.cs
@@ -57,14 +57,10 @@ protected internal static Field GetField(string name, string value)
protected internal static Directory directory;
protected internal static IndexReader reader;
- ///
- /// LUCENENET specific
- /// Is non-static because NewIndexWriterConfig is no longer static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random)).SetMergePolicy(NewLogMergePolicy()));
@@ -132,14 +128,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader.Dispose();
reader = null;
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
protected internal virtual void Check(SpanQuery q, int[] docs)
diff --git a/src/Lucene.Net.Tests/Search/TestBoolean2.cs b/src/Lucene.Net.Tests/Search/TestBoolean2.cs
index aff66d14f7..6f7b69d07d 100644
--- a/src/Lucene.Net.Tests/Search/TestBoolean2.cs
+++ b/src/Lucene.Net.Tests/Search/TestBoolean2.cs
@@ -61,9 +61,9 @@ public class TestBoolean2 : LuceneTestCase
private static int mulFactor;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random)).SetMergePolicy(NewLogMergePolicy()));
@@ -124,7 +124,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
littleReader.Dispose();
@@ -136,7 +136,7 @@ public override void AfterClass()
dir2 = null;
directory = null;
bigSearcher = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
private static readonly string[] docFields =
diff --git a/src/Lucene.Net.Tests/Search/TestBooleanMinShouldMatch.cs b/src/Lucene.Net.Tests/Search/TestBooleanMinShouldMatch.cs
index 2b8b9ee1f8..1c77c349b7 100644
--- a/src/Lucene.Net.Tests/Search/TestBooleanMinShouldMatch.cs
+++ b/src/Lucene.Net.Tests/Search/TestBooleanMinShouldMatch.cs
@@ -45,14 +45,10 @@ public class TestBooleanMinShouldMatch : LuceneTestCase
private static IndexReader r;
private static IndexSearcher s;
- ///
- /// LUCENENET specific
- /// Is non-static because NewStringField is no longer static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
string[] data =
{
@@ -88,14 +84,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
s = null;
r.Dispose();
r = null;
index.Dispose();
index = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
public virtual void VerifyNrHits(Query q, int expected)
diff --git a/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs b/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
index ee9d3a4df8..4df3b8426d 100644
--- a/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
+++ b/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
@@ -84,10 +84,10 @@ public class TestControlledRealTimeReopenThread : ThreadedIndexingAndSearchingTe
private bool warmCalled;
// LUCENENET specific - cleanup DisposableThreadLocal instances
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
lastGens.Dispose();
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Search/TestDateFilter.cs b/src/Lucene.Net.Tests/Search/TestDateFilter.cs
index fb183d1574..fb1fda7c5c 100644
--- a/src/Lucene.Net.Tests/Search/TestDateFilter.cs
+++ b/src/Lucene.Net.Tests/Search/TestDateFilter.cs
@@ -38,9 +38,9 @@ namespace Lucene.Net.Search
public class TestDateFilter : LuceneTestCase
{
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from TestBefore() to ensure calling order vs base class
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from TestBefore() to ensure calling order vs base class
{
- base.BeforeClass();
+ base.OneTimeSetUp();
// create an index
Directory indexStore = NewDirectory();
@@ -103,7 +103,7 @@ public void Test()
}
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - renamed from TestAfter() to ensure calling order vs base class
+ public override void OneTimeTearDown() // LUCENENET specific - renamed from TestAfter() to ensure calling order vs base class
{
// create an index
Directory indexStore = NewDirectory();
@@ -158,7 +158,7 @@ public override void AfterClass() // LUCENENET specific - renamed from TestAfter
reader.Dispose();
indexStore.Dispose();
- base.AfterClass();
+ base.OneTimeTearDown();
}
}
}
diff --git a/src/Lucene.Net.Tests/Search/TestExplanations.cs b/src/Lucene.Net.Tests/Search/TestExplanations.cs
index 75c889f3ed..8dab9ff881 100644
--- a/src/Lucene.Net.Tests/Search/TestExplanations.cs
+++ b/src/Lucene.Net.Tests/Search/TestExplanations.cs
@@ -63,20 +63,20 @@ public class TestExplanations : LuceneTestCase
public const string ALTFIELD = "alt";
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - renamed from AfterClassTestExplanations() to ensure calling order
+ public override void OneTimeTearDown() // LUCENENET specific - renamed from AfterClassTestExplanations() to ensure calling order
{
searcher = null;
reader.Dispose();
reader = null;
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from BeforeClassTestExplanations() to ensure calling order
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from BeforeClassTestExplanations() to ensure calling order
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random)).SetMergePolicy(NewLogMergePolicy()));
diff --git a/src/Lucene.Net.Tests/Search/TestFieldCache.cs b/src/Lucene.Net.Tests/Search/TestFieldCache.cs
index 6cb1542dcd..390daa7e54 100644
--- a/src/Lucene.Net.Tests/Search/TestFieldCache.cs
+++ b/src/Lucene.Net.Tests/Search/TestFieldCache.cs
@@ -104,12 +104,10 @@ public override void TearDown()
base.TearDown();
}
-
- // LUCENENET: Changed to non-static because NewIndexWriterConfig is non-static
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
NUM_DOCS = AtLeast(500);
NUM_ORDS = AtLeast(2);
@@ -173,7 +171,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
reader = null;
@@ -181,7 +179,7 @@ public override void AfterClass()
directory = null;
unicodeStrings = null;
multiValued = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Search/TestMinShouldMatch2.cs b/src/Lucene.Net.Tests/Search/TestMinShouldMatch2.cs
index b202e9b1d5..68d6cfe812 100644
--- a/src/Lucene.Net.Tests/Search/TestMinShouldMatch2.cs
+++ b/src/Lucene.Net.Tests/Search/TestMinShouldMatch2.cs
@@ -62,14 +62,10 @@ public class TestMinShouldMatch2 : LuceneTestCase
internal static readonly string[] mediumTerms = new string[] { "e", "f", "g" };
internal static readonly string[] rareTerms = new string[] { "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
- ///
- /// LUCENENET specific
- /// Is non-static because Similarity and TimeZone are not static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = NewDirectory();
RandomIndexWriter iw = new RandomIndexWriter(Random, dir);
@@ -118,7 +114,7 @@ public override float QueryNorm(float sumOfSquaredWeights)
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
atomicReader.Dispose();
dir.Dispose();
@@ -126,7 +122,7 @@ public override void AfterClass()
atomicReader = null;
r = null;
dir = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
private static void AddSome(Document doc, string[] values)
diff --git a/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs b/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs
index 621313f030..3e20bf19ad 100644
--- a/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs
+++ b/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs
@@ -45,15 +45,15 @@ public class TestMultiTermConstantScore : BaseTestRangeFilter
public const float SCORE_COMP_THRESH = 1e-6f;
// LUCENENET specific - made these instance variables
- // since our BeforeClass() and AfterClass() are instance
+ // since our OneTimeSetUp() and OneTimeTearDown() are instance
// methods and not doing so makes them cross runner threads.
internal /*static*/ Directory small;
internal /*static*/ IndexReader reader;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
string[] data = new string[] { "A 1 2 3 4 5 6", "Z 4 5 6", null, "B 2 4 5 6", "Y 3 5 6", null, "C 3 6", "X 4 5 6" };
@@ -77,13 +77,13 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader?.Dispose();
small?.Dispose();
reader = null;
small = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
///
diff --git a/src/Lucene.Net.Tests/Search/TestMultiTermQueryRewrites.cs b/src/Lucene.Net.Tests/Search/TestMultiTermQueryRewrites.cs
index d9533117ea..95645b0fef 100644
--- a/src/Lucene.Net.Tests/Search/TestMultiTermQueryRewrites.cs
+++ b/src/Lucene.Net.Tests/Search/TestMultiTermQueryRewrites.cs
@@ -47,14 +47,10 @@ public class TestMultiTermQueryRewrites : LuceneTestCase
private static IndexReader reader, multiReader, multiReaderDupls;
private static IndexSearcher searcher, multiSearcher, multiSearcherDupls;
- ///
- /// LUCENENET specific
- /// Is non-static because Similarity and TimeZone are not static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = NewDirectory();
sdir1 = NewDirectory();
@@ -88,7 +84,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
multiReader.Dispose();
@@ -99,7 +95,7 @@ public override void AfterClass()
reader = multiReader = multiReaderDupls = null;
searcher = multiSearcher = multiSearcherDupls = null;
dir = sdir1 = sdir2 = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
private Query ExtractInnerQuery(Query q)
diff --git a/src/Lucene.Net.Tests/Search/TestNGramPhraseQuery.cs b/src/Lucene.Net.Tests/Search/TestNGramPhraseQuery.cs
index b2699f825d..cb82fea61e 100644
--- a/src/Lucene.Net.Tests/Search/TestNGramPhraseQuery.cs
+++ b/src/Lucene.Net.Tests/Search/TestNGramPhraseQuery.cs
@@ -33,14 +33,10 @@ public class TestNGramPhraseQuery : LuceneTestCase
private static IndexReader reader;
private static Directory directory;
- ///
- /// LUCENENET specific
- /// Is non-static because Similarity and TimeZone are not static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory);
@@ -49,13 +45,13 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
reader = null;
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
@@ -114,4 +110,4 @@ public virtual void TestRewrite()
Assert.AreEqual(pq4.Boost, q.Boost, 0.1f);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests/Search/TestNumericRangeQuery32.cs b/src/Lucene.Net.Tests/Search/TestNumericRangeQuery32.cs
index a48c6c4e31..326054aa12 100644
--- a/src/Lucene.Net.Tests/Search/TestNumericRangeQuery32.cs
+++ b/src/Lucene.Net.Tests/Search/TestNumericRangeQuery32.cs
@@ -62,14 +62,10 @@ public class TestNumericRangeQuery32 : LuceneTestCase
private static IndexReader reader = null;
private static IndexSearcher searcher = null;
- ///
- /// LUCENENET specific
- /// Is non-static because NewIndexWriterConfig is no longer static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
noDocs = AtLeast(4096);
distance = (1 << 30) / noDocs;
@@ -148,14 +144,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader.Dispose();
reader = null;
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[SetUp]
diff --git a/src/Lucene.Net.Tests/Search/TestNumericRangeQuery64.cs b/src/Lucene.Net.Tests/Search/TestNumericRangeQuery64.cs
index 71b7f7c72b..23b51420e1 100644
--- a/src/Lucene.Net.Tests/Search/TestNumericRangeQuery64.cs
+++ b/src/Lucene.Net.Tests/Search/TestNumericRangeQuery64.cs
@@ -62,14 +62,10 @@ public class TestNumericRangeQuery64 : LuceneTestCase
private static IndexReader reader = null;
private static IndexSearcher searcher = null;
- ///
- /// LUCENENET specific
- /// Is non-static because NewIndexWriterConfig is no longer static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
noDocs = AtLeast(4096);
distance = (1L << 60) / noDocs;
@@ -159,14 +155,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader.Dispose();
reader = null;
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[SetUp]
diff --git a/src/Lucene.Net.Tests/Search/TestPhraseQuery.cs b/src/Lucene.Net.Tests/Search/TestPhraseQuery.cs
index 9f00d9473e..c97e022293 100644
--- a/src/Lucene.Net.Tests/Search/TestPhraseQuery.cs
+++ b/src/Lucene.Net.Tests/Search/TestPhraseQuery.cs
@@ -59,9 +59,9 @@ public class TestPhraseQuery : LuceneTestCase
private static Directory directory;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
Analyzer analyzer = new AnalyzerAnonymousClass();
@@ -110,7 +110,7 @@ public override void SetUp()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader.Dispose();
@@ -118,7 +118,7 @@ public override void AfterClass()
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/Lucene.Net.Tests/Search/TestPrefixInBooleanQuery.cs b/src/Lucene.Net.Tests/Search/TestPrefixInBooleanQuery.cs
index e64bcfccad..814e05e705 100644
--- a/src/Lucene.Net.Tests/Search/TestPrefixInBooleanQuery.cs
+++ b/src/Lucene.Net.Tests/Search/TestPrefixInBooleanQuery.cs
@@ -46,14 +46,10 @@ public class TestPrefixInBooleanQuery : LuceneTestCase
private static IndexReader reader;
private static IndexSearcher searcher;
- ///
- /// LUCENENET specific
- /// Is non-static because Similarity and TimeZone are not static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory);
@@ -85,7 +81,7 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
searcher = null;
reader.Dispose();
@@ -93,7 +89,7 @@ public override void AfterClass()
directory.Dispose();
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
@@ -128,4 +124,4 @@ public virtual void TestPrefixBooleanQuery()
Assert.AreEqual(2, searcher.Search(query, null, 1000).TotalHits, "Number of matched documents");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests/Search/TestSubScorerFreqs.cs b/src/Lucene.Net.Tests/Search/TestSubScorerFreqs.cs
index 13f45234cd..bbccca535a 100644
--- a/src/Lucene.Net.Tests/Search/TestSubScorerFreqs.cs
+++ b/src/Lucene.Net.Tests/Search/TestSubScorerFreqs.cs
@@ -37,9 +37,9 @@ public class TestSubScorerFreqs : LuceneTestCase
private static IndexSearcher s;
[OneTimeSetUp]
- public override void BeforeClass() // LUCENENET specific - renamed from MakeIndex() to ensure calling order
+ public override void OneTimeSetUp() // LUCENENET specific - renamed from MakeIndex() to ensure calling order
{
- base.BeforeClass();
+ base.OneTimeSetUp();
dir = new RAMDirectory();
RandomIndexWriter w = new RandomIndexWriter(Random, dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random)).SetMergePolicy(NewLogMergePolicy()));
@@ -61,14 +61,14 @@ public override void BeforeClass() // LUCENENET specific - renamed from MakeInde
}
[OneTimeTearDown]
- public override void AfterClass() // LUCENENET specific - renamed from Finish() to ensure calling order
+ public override void OneTimeTearDown() // LUCENENET specific - renamed from Finish() to ensure calling order
{
s.IndexReader.Dispose();
s = null;
dir.Dispose();
dir = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
private class CountingCollector : ICollector
diff --git a/src/Lucene.Net.Tests/Search/TestTermVectors.cs b/src/Lucene.Net.Tests/Search/TestTermVectors.cs
index 3ad16ed216..2a2c6cb171 100644
--- a/src/Lucene.Net.Tests/Search/TestTermVectors.cs
+++ b/src/Lucene.Net.Tests/Search/TestTermVectors.cs
@@ -48,14 +48,10 @@ public class TestTermVectors : LuceneTestCase
private static IndexReader reader;
private static Directory directory;
- ///
- /// LUCENENET specific
- /// Is non-static because NewIndexWriterConfig is no longer static.
- ///
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
directory = NewDirectory();
RandomIndexWriter writer = new RandomIndexWriter(Random, directory, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random, MockTokenizer.SIMPLE, true)).SetMergePolicy(NewLogMergePolicy()));
@@ -97,14 +93,14 @@ public override void BeforeClass()
}
[OneTimeTearDown]
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
reader.Dispose();
directory.Dispose();
reader = null;
directory = null;
- base.AfterClass();
+ base.OneTimeTearDown();
}
// In a single doc, for the same field, mix the term
@@ -276,4 +272,4 @@ public virtual void TestFullMergeAddIndexesReader()
IOUtils.Dispose(target, input[0], input[1]);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Lucene.Net.Tests/Util/TestIndexableBinaryStringTools.cs b/src/Lucene.Net.Tests/Util/TestIndexableBinaryStringTools.cs
index 2c578f72a2..93f5eb4be0 100644
--- a/src/Lucene.Net.Tests/Util/TestIndexableBinaryStringTools.cs
+++ b/src/Lucene.Net.Tests/Util/TestIndexableBinaryStringTools.cs
@@ -32,9 +32,9 @@ public class TestIndexableBinaryStringTools : LuceneTestCase
private static int MAX_RANDOM_BINARY_LENGTH;
[OneTimeSetUp]
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
NUM_RANDOM_TESTS = AtLeast(200);
MAX_RANDOM_BINARY_LENGTH = AtLeast(300);
diff --git a/src/dotnet/tools/Lucene.Net.Tests.Cli/Configuration/ConfigurationSettingsTest.cs b/src/dotnet/tools/Lucene.Net.Tests.Cli/Configuration/ConfigurationSettingsTest.cs
index e64efb30f4..f6d1d8eace 100644
--- a/src/dotnet/tools/Lucene.Net.Tests.Cli/Configuration/ConfigurationSettingsTest.cs
+++ b/src/dotnet/tools/Lucene.Net.Tests.Cli/Configuration/ConfigurationSettingsTest.cs
@@ -39,14 +39,14 @@ internal class ConfigurationSettingsTest : ConfigurationSettingsTestCase
protected override IConfiguration LoadConfiguration()
{
IConfigurationRoot configuration = new ConfigurationBuilder()
- .AddEnvironmentVariables(prefix: EnvironmentVariablePrefix) // Use a custom prefix to only load Lucene.NET settings
+ .AddEnvironmentVariables(prefix: EnvironmentVariablePrefix) // Use a custom prefix to only load Lucene.NET settings
.AddJsonFile(TestJsonFilePath)
.Build();
return configuration;
}
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
// Create directories if they do not exist
Directory.CreateDirectory(TempFileDirectory);
@@ -62,10 +62,10 @@ public override void BeforeClass()
string testKey = EnvironmentVariablePrefix + "tests:setup";
string testValue = "setup";
Environment.SetEnvironmentVariable(testKey, testValue);
- base.BeforeClass();
+ base.OneTimeSetUp();
}
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
try
{
@@ -79,7 +79,7 @@ public override void AfterClass()
}
catch { }
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]
diff --git a/src/dotnet/tools/Lucene.Net.Tests.Cli/InstallationTest.cs b/src/dotnet/tools/Lucene.Net.Tests.Cli/InstallationTest.cs
index 9781963076..5ab86c57ed 100644
--- a/src/dotnet/tools/Lucene.Net.Tests.Cli/InstallationTest.cs
+++ b/src/dotnet/tools/Lucene.Net.Tests.Cli/InstallationTest.cs
@@ -40,9 +40,9 @@ public class InstallationTest : LuceneTestCase
private static DirectoryInfo tempWork;
private static string packageVersion;
- public override void BeforeClass()
+ public override void OneTimeSetUp()
{
- base.BeforeClass();
+ base.OneTimeSetUp();
tempWork = CreateTempDir();
FileInfo packageFile;
@@ -79,11 +79,11 @@ public override void BeforeClass()
AssertCommandExitCode(ExitCode.Success, "dotnet", $"tool install {LuceneCliToolName} --version {packageVersion} --framework {targetFramework} --add-source \"{packageFile.DirectoryName}\" --tool-path \"{tempWork.FullName}\"");
}
- public override void AfterClass()
+ public override void OneTimeTearDown()
{
// Uninstall our tool - we are done with it.
AssertCommandExitCode(ExitCode.Success, "dotnet", $"tool uninstall {LuceneCliToolName} --tool-path \"{tempWork.FullName}\"");
- base.AfterClass();
+ base.OneTimeTearDown();
}
[Test]