Skip to content

Commit 723af06

Browse files
committed
Use explicit constructors
1 parent 85c9953 commit 723af06

34 files changed

+173
-40
lines changed

tests/NRedisStack.Tests/Bloom/BloomTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
namespace NRedisStack.Tests.Bloom;
66

7-
public class BloomTests(EndpointsFixture endpointsFixture)
8-
: AbstractNRedisStackTest(endpointsFixture), IDisposable
7+
public class BloomTests : AbstractNRedisStackTest, IDisposable
98
{
109
private readonly string key = "BLOOM_TESTS";
1110

11+
public BloomTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
12+
{
13+
}
14+
1215
[Theory]
1316
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
1417
public void TestReserveBasic(string endpointId)

tests/NRedisStack.Tests/Core Commands/CoreTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88

99
namespace NRedisStack.Tests.Core;
1010

11-
public class CoreTests(EndpointsFixture endpointsFixture) : AbstractNRedisStackTest(endpointsFixture), IDisposable
11+
public class CoreTests : AbstractNRedisStackTest, IDisposable
1212
{
13+
public CoreTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
14+
{
15+
}
16+
1317
// TODO: understand why this test fails on enterprise
1418
[SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]
1519
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]

tests/NRedisStack.Tests/CountMinSketch/CmsTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
namespace NRedisStack.Tests.CuckooFilter;
66

7-
public class CmsTests(EndpointsFixture endpointsFixture) : AbstractNRedisStackTest(endpointsFixture), IDisposable
7+
public class CmsTests : AbstractNRedisStackTest, IDisposable
88
{
99
private readonly string key = "CMS_TESTS";
1010

11+
public CmsTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
12+
{
13+
}
14+
1115

1216
[Theory]
1317
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]

tests/NRedisStack.Tests/CuckooFilter/CuckooTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ namespace NRedisStack.Tests.CuckooFilter;
66

77
//
88

9-
public class CuckooTests(EndpointsFixture endpointsFixture) : AbstractNRedisStackTest(endpointsFixture), IDisposable
9+
public class CuckooTests : AbstractNRedisStackTest, IDisposable
1010
{
1111
private readonly string key = "CUCKOO_TESTS";
1212

13+
public CuckooTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
14+
{
15+
}
16+
1317
[Theory]
1418
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
1519
public void TestReserveBasic(string endpointId)

tests/NRedisStack.Tests/Examples/ExampleTests.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@
1010

1111
namespace NRedisStack.Tests;
1212

13-
public class ExampleTests(EndpointsFixture endpointsFixture, ITestOutputHelper testOutputHelper)
14-
: AbstractNRedisStackTest(endpointsFixture), IDisposable
13+
public class ExampleTests : AbstractNRedisStackTest, IDisposable
1514
{
16-
private readonly ITestOutputHelper testOutputHelper = testOutputHelper;
15+
private readonly ITestOutputHelper testOutputHelper;
16+
17+
public ExampleTests(EndpointsFixture endpointsFixture, ITestOutputHelper testOutputHelper) : base(endpointsFixture)
18+
{
19+
this.testOutputHelper = testOutputHelper;
20+
}
1721
// private readonly string key = "EXAMPLES_TESTS";
1822

1923
[Theory]

tests/NRedisStack.Tests/Graph/GraphTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66

77
namespace NRedisStack.Tests.Graph;
88

9-
public class GraphTests(EndpointsFixture endpointsFixture) : AbstractNRedisStackTest(endpointsFixture), IDisposable
9+
public class GraphTests : AbstractNRedisStackTest, IDisposable
1010
{
11+
public GraphTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
12+
{
13+
}
14+
1115
#region SyncTests
1216

1317
[SkipIfRedis(Comparison.GreaterThanOrEqual, "7.1.242")]

tests/NRedisStack.Tests/Json/JsonTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77

88
namespace NRedisStack.Tests;
99

10-
public class JsonTests(EndpointsFixture endpointsFixture) : AbstractNRedisStackTest(endpointsFixture), IDisposable
10+
public class JsonTests : AbstractNRedisStackTest, IDisposable
1111
{
12+
public JsonTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
13+
{
14+
}
15+
1216
[Theory]
1317
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
1418
public void TestSetFromFile(string endpointId)

tests/NRedisStack.Tests/PipelineTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66

77
namespace NRedisStack.Tests;
88

9-
public class PipelineTests(EndpointsFixture endpointsFixture) : AbstractNRedisStackTest(endpointsFixture), IDisposable
9+
public class PipelineTests : AbstractNRedisStackTest, IDisposable
1010
{
11+
public PipelineTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
12+
{
13+
}
14+
1115
private const string key = "PIPELINE_TESTS";
1216

1317
[SkipIfRedis(Comparison.GreaterThanOrEqual, "7.1.242")]

tests/NRedisStack.Tests/Search/IndexCreationTests.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66

77
namespace NRedisStack.Tests.Search;
88

9-
public class IndexCreationTests(EndpointsFixture endpointsFixture)
10-
: AbstractNRedisStackTest(endpointsFixture), IDisposable
9+
public class IndexCreationTests : AbstractNRedisStackTest, IDisposable
1110
{
1211
private readonly string index = "MISSING_EMPTY_INDEX";
12+
13+
public IndexCreationTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
14+
{
15+
}
16+
1317
private static readonly string INDEXMISSING = "INDEXMISSING";
1418
private static readonly string INDEXEMPTY = "INDEXEMPTY";
1519

tests/NRedisStack.Tests/Search/SearchTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace NRedisStack.Tests.Search;
1414

15-
public class SearchTests(EndpointsFixture endpointsFixture) : AbstractNRedisStackTest(endpointsFixture), IDisposable
15+
public class SearchTests : AbstractNRedisStackTest, IDisposable
1616
{
1717
// private readonly string key = "SEARCH_TESTS";
1818
private readonly string index = "TEST_INDEX";
@@ -2569,6 +2569,10 @@ public async Task TestQueryParamsWithParams_DefaultDialectAsync(string endpointI
25692569

25702570
string key = "SugTestKey";
25712571

2572+
public SearchTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
2573+
{
2574+
}
2575+
25722576
[Fact]
25732577
public void TestAddAndGetSuggestion()
25742578
{

0 commit comments

Comments
 (0)