Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build/example-test-harness/dotnet/stubs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ protected IDatabase GetCleanDatabase(EndpointsFixture.Env env)

// The examples annotate the test method [SkippableFact]; make it a plain Fact.
public class SkippableFactAttribute : FactAttribute { }

// Some examples annotate with [SkipIfRedisFact(Comparison.LessThan, "7.0.0")] to skip
// on old servers. The harness always runs against a recent Redis, so make it a plain
// Fact too rather than reproducing NRedisStack's real version-detection logic.
public enum Comparison { LessThan, GreaterThanOrEqual }

public class SkipIfRedisFactAttribute : FactAttribute
{
public SkipIfRedisFactAttribute(Comparison comparison, string targetVersion) { }
}
}

// Satisfy [Collection("DocsTests")] + constructor injection of EndpointsFixture.
Expand Down
Loading