Skip to content

Commit

Permalink
Remove unnecessary comments; Fix docs in LuceneTestCase w/r/t setup/t…
Browse files Browse the repository at this point in the history
…eardown
  • Loading branch information
paulirwin committed Nov 27, 2024
1 parent 157528c commit a3b9f0c
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 48 deletions.
10 changes: 8 additions & 2 deletions src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,14 @@ namespace Lucene.Net.Util
/// <h3>Class and instance setup.</h3>
///
/// <para>
/// The preferred way to specify class (suite-level) setup/cleanup is to use
/// static methods annotated with <see cref="NUnit.Framework.OneTimeSetUpAttribute"/> and <see cref="NUnit.Framework.OneTimeTearDownAttribute"/>. Any
/// The preferred way to specify class (suite-level) setup/cleanup is to override
/// <see cref="OneTimeSetUp"/> and <see cref="OneTimeTearDown"/>. Be sure
/// to call <c>base.OneTimeSetUp()</c> BEFORE you initialize your class and
/// call <c>base.OneTimeTearDown()</c> AFTER you clean up your class. NUnit
/// will find the <see cref="NUnit.Framework.OneTimeSetUpAttribute"/> and
/// <see cref="NUnit.Framework.OneTimeTearDownAttribute"/> of the base class,
/// so using them on the <see cref="OneTimeSetUp"/> and
/// <see cref="OneTimeTearDown"/> 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. <b>Try not to use static initializers
/// (including complex readonly field initializers).</b> Static initializers are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ public class TestTaxonomyFacetAssociations : FacetTestCase

private static FacetsConfig config;

/// <summary>
/// LUCENENET specific
/// Is non-static because Similarity and TimeZone are not static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/Spans/TestBasics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ public override void Reset()

internal static Analyzer simplePayloadAnalyzer;

/// <summary>
/// LUCENENET specific
/// Is non-static because NewIndexWriterConfig is no longer static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ protected internal static Field GetField(string name, string value)
protected internal static Directory directory;
protected internal static IndexReader reader;

/// <summary>
/// LUCENENET specific
/// Is non-static because NewIndexWriterConfig is no longer static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestBooleanMinShouldMatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ public class TestBooleanMinShouldMatch : LuceneTestCase
private static IndexReader r;
private static IndexSearcher s;

/// <summary>
/// LUCENENET specific
/// Is non-static because NewStringField is no longer static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
2 changes: 0 additions & 2 deletions src/Lucene.Net.Tests/Search/TestFieldCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ public override void TearDown()
base.TearDown();
}


// LUCENENET: Changed to non-static because NewIndexWriterConfig is non-static
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestMinShouldMatch2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ 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" };

/// <summary>
/// LUCENENET specific
/// Is non-static because Similarity and TimeZone are not static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestMultiTermQueryRewrites.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ public class TestMultiTermQueryRewrites : LuceneTestCase
private static IndexReader reader, multiReader, multiReaderDupls;
private static IndexSearcher searcher, multiSearcher, multiSearcherDupls;

/// <summary>
/// LUCENENET specific
/// Is non-static because Similarity and TimeZone are not static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestNGramPhraseQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ public class TestNGramPhraseQuery : LuceneTestCase
private static IndexReader reader;
private static Directory directory;

/// <summary>
/// LUCENENET specific
/// Is non-static because Similarity and TimeZone are not static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestNumericRangeQuery32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ public class TestNumericRangeQuery32 : LuceneTestCase
private static IndexReader reader = null;
private static IndexSearcher searcher = null;

/// <summary>
/// LUCENENET specific
/// Is non-static because NewIndexWriterConfig is no longer static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestNumericRangeQuery64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ public class TestNumericRangeQuery64 : LuceneTestCase
private static IndexReader reader = null;
private static IndexSearcher searcher = null;

/// <summary>
/// LUCENENET specific
/// Is non-static because NewIndexWriterConfig is no longer static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestPrefixInBooleanQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ public class TestPrefixInBooleanQuery : LuceneTestCase
private static IndexReader reader;
private static IndexSearcher searcher;

/// <summary>
/// LUCENENET specific
/// Is non-static because Similarity and TimeZone are not static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Lucene.Net.Tests/Search/TestTermVectors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ public class TestTermVectors : LuceneTestCase
private static IndexReader reader;
private static Directory directory;

/// <summary>
/// LUCENENET specific
/// Is non-static because NewIndexWriterConfig is no longer static.
/// </summary>
[OneTimeSetUp]
public override void OneTimeSetUp()
{
Expand Down

0 comments on commit a3b9f0c

Please sign in to comment.