Skip to content
Prev Previous commit
Next Next commit
rename test discoverers to avoid ambiguity in the reader
  • Loading branch information
mgravell committed Mar 12, 2026
commit e03a7caf05a92fa2170c0302340d21dd12ec185f
12 changes: 6 additions & 6 deletions tests/NRedisStack.Tests/SkipIfRedisTheoryAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ public string? Skip
/// </para>
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
[XunitTestCaseDiscoverer(typeof(TheoryDiscoverer))]
[XunitTestCaseDiscoverer(typeof(ExpandingTheoryDiscoverer))]
public class TheoryAttribute(
[CallerFilePath] string? sourceFilePath = null,
[CallerLineNumber] int sourceLineNumber = -1) : Xunit.TheoryAttribute(sourceFilePath, sourceLineNumber)
{
public class TheoryDiscoverer : Xunit.v3.TheoryDiscoverer
public class ExpandingTheoryDiscoverer : Xunit.v3.TheoryDiscoverer
{
protected override ValueTask<IReadOnlyCollection<IXunitTestCase>> CreateTestCasesForDataRow(ITestFrameworkDiscoveryOptions discoveryOptions, IXunitTestMethod testMethod, ITheoryAttribute theoryAttribute, ITheoryDataRow dataRow, object?[] testMethodArguments)
=> base.CreateTestCasesForDataRow(discoveryOptions, testMethod, theoryAttribute, dataRow, testMethodArguments).ExpandAsync();
Expand All @@ -126,7 +126,7 @@ protected override ValueTask<IReadOnlyCollection<IXunitTestCase>> CreateTestCase
}

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
[XunitTestCaseDiscoverer(typeof(TheoryDiscoverer))]
[XunitTestCaseDiscoverer(typeof(ExpandingTheoryDiscoverer))]
public class SkipIfRedisTheoryAttribute : TheoryAttribute
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
{
public SkipIfRedisTheoryAttribute(
Expand Down Expand Up @@ -168,19 +168,19 @@ public SkipIfRedisTheoryAttribute(
/// </para>
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
[XunitTestCaseDiscoverer(typeof(FactDiscoverer))]
[XunitTestCaseDiscoverer(typeof(ExpandingFactDiscoverer))]
public class FactAttribute([CallerFilePath] string? sourceFilePath = null, [CallerLineNumber] int sourceLineNumber = -1)
: Xunit.FactAttribute(sourceFilePath, sourceLineNumber)
{
public class FactDiscoverer : Xunit.v3.FactDiscoverer
public class ExpandingFactDiscoverer : Xunit.v3.FactDiscoverer
{
public override ValueTask<IReadOnlyCollection<IXunitTestCase>> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, IXunitTestMethod testMethod, IFactAttribute factAttribute)
=> base.Discover(discoveryOptions, testMethod, factAttribute).ExpandAsync();
}
}

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
[XunitTestCaseDiscoverer(typeof(FactDiscoverer))]
[XunitTestCaseDiscoverer(typeof(ExpandingFactDiscoverer))]
public class SkipIfRedisFactAttribute : FactAttribute
{
public SkipIfRedisFactAttribute(
Expand Down
Loading