From 0a1f46890350e648f51f40d3940d3ab7cad1e589 Mon Sep 17 00:00:00 2001 From: atakavci Date: Thu, 30 Jan 2025 13:53:29 +0300 Subject: [PATCH 1/7] enable doc tests with new test infra --- tests/Doc/Bf_tutorial.cs | 12 +++++++----- tests/Doc/Bitmap_tutorial.cs | 12 +++++++----- tests/Doc/CmdsGenericExample.cs | 12 ++++++++---- tests/Doc/CmdsHashExample.cs | 12 +++++++----- tests/Doc/CmdsSortedSetExamples.cs | 12 +++++++----- tests/Doc/CmdsStringExample.cs | 12 +++++++----- tests/Doc/Cms_tutorial.cs | 12 +++++++----- tests/Doc/Cuckoo_tutorial.cs | 12 +++++++----- tests/Doc/Geo_tutorial.cs | 12 +++++++----- tests/Doc/HashExample.cs | 12 +++++++----- tests/Doc/Hll_tutorial.cs | 12 +++++++----- tests/Doc/HomeJsonExample.cs | 13 ++++++++----- tests/Doc/Json_tutorial.cs | 12 +++++++----- tests/Doc/ListTutorial.cs | 13 +++++++++---- tests/Doc/QueryAggExample.cs | 12 +++++++----- tests/Doc/QueryEmExample.cs | 12 +++++++----- tests/Doc/QueryFtExample.cs | 12 +++++++----- tests/Doc/QueryRangeExample.cs | 12 +++++++----- tests/Doc/SearchQuickstartExample.cs | 9 ++++++--- tests/Doc/SetGetExample.cs | 9 ++++++--- tests/Doc/SetsTutorial.cs | 12 +++++++----- tests/Doc/SortedSetExample.cs | 14 +++++++++----- tests/Doc/StreamTutorial.cs | 12 +++++++----- tests/Doc/StringSnippets.cs | 10 ++++++++-- tests/Doc/Tdigest_tutorial.cs | 12 +++++++----- tests/Doc/Topk_tutorial.cs | 12 +++++++----- 26 files changed, 187 insertions(+), 121 deletions(-) diff --git a/tests/Doc/Bf_tutorial.cs b/tests/Doc/Bf_tutorial.cs index e85fb0dc..ee69d7e4 100644 --- a/tests/Doc/Bf_tutorial.cs +++ b/tests/Doc/Bf_tutorial.cs @@ -13,13 +13,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Bf_tutorial +public class Bf_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Bf_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:models"); diff --git a/tests/Doc/Bitmap_tutorial.cs b/tests/Doc/Bitmap_tutorial.cs index f4452068..8767f463 100644 --- a/tests/Doc/Bitmap_tutorial.cs +++ b/tests/Doc/Bitmap_tutorial.cs @@ -12,13 +12,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Bitmap_tutorial +public class Bitmap_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Bitmap_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("pings:2024-01-01-00:00"); diff --git a/tests/Doc/CmdsGenericExample.cs b/tests/Doc/CmdsGenericExample.cs index 448c6efb..83382533 100644 --- a/tests/Doc/CmdsGenericExample.cs +++ b/tests/Doc/CmdsGenericExample.cs @@ -12,13 +12,17 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsGenericExample +public class CmdsGenericExample : AbstractNRedisStackTest, IDisposable { + public CmdsGenericExample(EndpointsFixture fixture) : base(fixture) { } - public void run() + + [SkipIfRedis(Comparison.LessThan, "7.0.0")] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. diff --git a/tests/Doc/CmdsHashExample.cs b/tests/Doc/CmdsHashExample.cs index d2c4e33f..ff1a9bf1 100644 --- a/tests/Doc/CmdsHashExample.cs +++ b/tests/Doc/CmdsHashExample.cs @@ -10,13 +10,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsHashExample +public class CmdsHashExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public CmdsHashExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("myhash"); diff --git a/tests/Doc/CmdsSortedSetExamples.cs b/tests/Doc/CmdsSortedSetExamples.cs index 99fa8b32..abfda108 100644 --- a/tests/Doc/CmdsSortedSetExamples.cs +++ b/tests/Doc/CmdsSortedSetExamples.cs @@ -12,13 +12,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsSortedSet +public class CmdsSortedSet: AbstractNRedisStackTest, IDisposable { - - public void run() + public CmdsSortedSet(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. diff --git a/tests/Doc/CmdsStringExample.cs b/tests/Doc/CmdsStringExample.cs index dce5daf4..5985ced4 100644 --- a/tests/Doc/CmdsStringExample.cs +++ b/tests/Doc/CmdsStringExample.cs @@ -12,13 +12,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsStringExample +public class CmdsStringExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public CmdsStringExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. diff --git a/tests/Doc/Cms_tutorial.cs b/tests/Doc/Cms_tutorial.cs index e92aa4b4..8aa1fd5c 100644 --- a/tests/Doc/Cms_tutorial.cs +++ b/tests/Doc/Cms_tutorial.cs @@ -14,13 +14,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Cms_tutorial +public class Cms_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Cms_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:profit"); diff --git a/tests/Doc/Cuckoo_tutorial.cs b/tests/Doc/Cuckoo_tutorial.cs index 826cb5cf..c688005f 100644 --- a/tests/Doc/Cuckoo_tutorial.cs +++ b/tests/Doc/Cuckoo_tutorial.cs @@ -13,13 +13,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Cuckoo_tutorial +public class Cuckoo_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Cuckoo_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:models"); diff --git a/tests/Doc/Geo_tutorial.cs b/tests/Doc/Geo_tutorial.cs index 576f533d..a29a77c7 100644 --- a/tests/Doc/Geo_tutorial.cs +++ b/tests/Doc/Geo_tutorial.cs @@ -12,13 +12,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Geo_tutorial +public class Geo_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Geo_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:rentable"); diff --git a/tests/Doc/HashExample.cs b/tests/Doc/HashExample.cs index 3f80b696..eec1b324 100644 --- a/tests/Doc/HashExample.cs +++ b/tests/Doc/HashExample.cs @@ -8,13 +8,15 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class HashExample +public class HashExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public HashExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); db.KeyDelete("bike:1"); //HIDE_END //STEP_START set_get_all diff --git a/tests/Doc/Hll_tutorial.cs b/tests/Doc/Hll_tutorial.cs index 97409432..2ead95c2 100644 --- a/tests/Doc/Hll_tutorial.cs +++ b/tests/Doc/Hll_tutorial.cs @@ -12,13 +12,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Hll_tutorial +public class Hll_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Hll_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete(new RedisKey[] { "{bikes}", "commuter_{bikes}", "all_{bikes}" }); diff --git a/tests/Doc/HomeJsonExample.cs b/tests/Doc/HomeJsonExample.cs index 0132f75e..04151a0b 100644 --- a/tests/Doc/HomeJsonExample.cs +++ b/tests/Doc/HomeJsonExample.cs @@ -16,14 +16,17 @@ namespace Doc; // REMOVE_END // HIDE_START -public class HomeJsonExample +public class HomeJsonExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public HomeJsonExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { // STEP_START connect - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + + var db = GetCleanDatabase(endpointId); // STEP_END //REMOVE_START diff --git a/tests/Doc/Json_tutorial.cs b/tests/Doc/Json_tutorial.cs index 59ebac6a..53b8c73e 100644 --- a/tests/Doc/Json_tutorial.cs +++ b/tests/Doc/Json_tutorial.cs @@ -14,13 +14,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Json_tutorial +public class Json_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Json_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bike"); diff --git a/tests/Doc/ListTutorial.cs b/tests/Doc/ListTutorial.cs index 79ee0135..739f59dd 100644 --- a/tests/Doc/ListTutorial.cs +++ b/tests/Doc/ListTutorial.cs @@ -11,12 +11,17 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class ListExample +public class ListExample: AbstractNRedisStackTest, IDisposable { - public void run() + public ListExample(EndpointsFixture fixture) : base(fixture) { } + + //REMOVE_START + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + //REMOVE_END + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //HIDE_END //REMOVE_START db.KeyDelete("bikes:repairs"); diff --git a/tests/Doc/QueryAggExample.cs b/tests/Doc/QueryAggExample.cs index 2364fdfd..99505536 100644 --- a/tests/Doc/QueryAggExample.cs +++ b/tests/Doc/QueryAggExample.cs @@ -16,13 +16,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryAggExample +public class QueryAggExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public QueryAggExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle"); } catch { } diff --git a/tests/Doc/QueryEmExample.cs b/tests/Doc/QueryEmExample.cs index 3e1b7f33..143aec49 100644 --- a/tests/Doc/QueryEmExample.cs +++ b/tests/Doc/QueryEmExample.cs @@ -15,13 +15,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryEmExample +public class QueryEmExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public QueryEmExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle"); } catch { } diff --git a/tests/Doc/QueryFtExample.cs b/tests/Doc/QueryFtExample.cs index 350b4eaa..60addb3b 100644 --- a/tests/Doc/QueryFtExample.cs +++ b/tests/Doc/QueryFtExample.cs @@ -15,13 +15,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryFtExample +public class QueryFtExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public QueryFtExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle", true); } catch { } diff --git a/tests/Doc/QueryRangeExample.cs b/tests/Doc/QueryRangeExample.cs index cdc6d83f..1f2ace35 100644 --- a/tests/Doc/QueryRangeExample.cs +++ b/tests/Doc/QueryRangeExample.cs @@ -15,13 +15,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryRangeExample +public class QueryRangeExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public QueryRangeExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle", dd: true); } catch { } diff --git a/tests/Doc/SearchQuickstartExample.cs b/tests/Doc/SearchQuickstartExample.cs index a683b488..b1d6072f 100644 --- a/tests/Doc/SearchQuickstartExample.cs +++ b/tests/Doc/SearchQuickstartExample.cs @@ -11,10 +11,13 @@ namespace Doc; [Collection("DocsTests")] // REMOVE_END -public class SearchQuickstartExample +public class SearchQuickstartExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public SearchQuickstartExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { // STEP_START connect var redis = ConnectionMultiplexer.Connect("localhost:6379"); diff --git a/tests/Doc/SetGetExample.cs b/tests/Doc/SetGetExample.cs index 84f8406a..7b812965 100644 --- a/tests/Doc/SetGetExample.cs +++ b/tests/Doc/SetGetExample.cs @@ -8,10 +8,13 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SetGetExample +public class SetGetExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public SetGetExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { var redis = ConnectionMultiplexer.Connect("localhost:6379"); var db = redis.GetDatabase(); diff --git a/tests/Doc/SetsTutorial.cs b/tests/Doc/SetsTutorial.cs index 671c1a98..ee56b73d 100644 --- a/tests/Doc/SetsTutorial.cs +++ b/tests/Doc/SetsTutorial.cs @@ -13,13 +13,15 @@ namespace Doc; //REMOVE_END // HIDE_START -public class SetsExample +public class SetsExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public SetsExample(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. bool delRes = db.KeyDelete("bikes:racing:france"); diff --git a/tests/Doc/SortedSetExample.cs b/tests/Doc/SortedSetExample.cs index 5dce4136..8417a2bd 100644 --- a/tests/Doc/SortedSetExample.cs +++ b/tests/Doc/SortedSetExample.cs @@ -9,13 +9,17 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SortedSetExample +public class SortedSetExample: AbstractNRedisStackTest, IDisposable { - - public void run() + public SortedSetExample(EndpointsFixture fixture) : base(fixture) { } + + //REMOVE_START + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + //REMOVE_END + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START db.KeyDelete("racer_scores"); //REMOVE_END diff --git a/tests/Doc/StreamTutorial.cs b/tests/Doc/StreamTutorial.cs index 8619ead6..3d08379b 100644 --- a/tests/Doc/StreamTutorial.cs +++ b/tests/Doc/StreamTutorial.cs @@ -13,13 +13,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class StreamTutorial +public class StreamTutorial : AbstractNRedisStackTest, IDisposable { + public StreamTutorial(EndpointsFixture fixture) : base(fixture) { } - public void run() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("race:france"); @@ -189,7 +191,7 @@ public void run() // STEP_START xadd_7 RedisValue res11 = ""; - Version version = muxer.GetServer("localhost:6379").Version; + Version version = GetConnection(endpointId).GetServers()[0].Version; if (version.Major >= 7) { res11 = db.StreamAdd( diff --git a/tests/Doc/StringSnippets.cs b/tests/Doc/StringSnippets.cs index d2f8ea24..ec636bf2 100644 --- a/tests/Doc/StringSnippets.cs +++ b/tests/Doc/StringSnippets.cs @@ -9,9 +9,15 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class StringSnippets +public class StringSnippets : AbstractNRedisStackTest, IDisposable { - public void run() + public StringSnippets(EndpointsFixture fixture) : base(fixture) { } + + //REMOVE_START + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + //REMOVE_END + public void run(string endpointId) { var redis = ConnectionMultiplexer.Connect("localhost:6379"); var db = redis.GetDatabase(); diff --git a/tests/Doc/Tdigest_tutorial.cs b/tests/Doc/Tdigest_tutorial.cs index 44ba47c5..803636c8 100644 --- a/tests/Doc/Tdigest_tutorial.cs +++ b/tests/Doc/Tdigest_tutorial.cs @@ -13,13 +13,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Tdigest_tutorial +public class Tdigest_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Tdigest_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("racer_ages"); diff --git a/tests/Doc/Topk_tutorial.cs b/tests/Doc/Topk_tutorial.cs index b364d47e..80d6b621 100644 --- a/tests/Doc/Topk_tutorial.cs +++ b/tests/Doc/Topk_tutorial.cs @@ -13,13 +13,15 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Topk_tutorial +public class Topk_tutorial : AbstractNRedisStackTest, IDisposable { - - public void run() + public Topk_tutorial(EndpointsFixture fixture) : base(fixture) { } + + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] + public void run(string endpointId) { - var muxer = ConnectionMultiplexer.Connect("localhost:6379"); - var db = muxer.GetDatabase(); + var db = GetCleanDatabase(endpointId); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:keywords"); From 8735e3f940d809aff0a4b0bcc21d38a0b2faac8c Mon Sep 17 00:00:00 2001 From: atakavci Date: Thu, 30 Jan 2025 14:38:07 +0300 Subject: [PATCH 2/7] formatting fixes --- tests/Doc/Bf_tutorial.cs | 2 +- tests/Doc/Bitmap_tutorial.cs | 2 +- tests/Doc/CmdsHashExample.cs | 4 ++-- tests/Doc/CmdsSortedSetExamples.cs | 4 ++-- tests/Doc/CmdsStringExample.cs | 4 ++-- tests/Doc/Cms_tutorial.cs | 2 +- tests/Doc/Cuckoo_tutorial.cs | 2 +- tests/Doc/Geo_tutorial.cs | 2 +- tests/Doc/HashExample.cs | 4 ++-- tests/Doc/Hll_tutorial.cs | 2 +- tests/Doc/HomeJsonExample.cs | 4 ++-- tests/Doc/Json_tutorial.cs | 2 +- tests/Doc/ListTutorial.cs | 4 ++-- tests/Doc/QueryAggExample.cs | 4 ++-- tests/Doc/QueryEmExample.cs | 4 ++-- tests/Doc/QueryFtExample.cs | 4 ++-- tests/Doc/QueryRangeExample.cs | 4 ++-- tests/Doc/SearchQuickstartExample.cs | 7 +++---- tests/Doc/SetGetExample.cs | 7 +++---- tests/Doc/SetsTutorial.cs | 4 ++-- tests/Doc/SortedSetExample.cs | 4 ++-- tests/Doc/StringSnippets.cs | 3 +-- tests/Doc/Tdigest_tutorial.cs | 2 +- tests/Doc/Topk_tutorial.cs | 2 +- 24 files changed, 40 insertions(+), 43 deletions(-) diff --git a/tests/Doc/Bf_tutorial.cs b/tests/Doc/Bf_tutorial.cs index ee69d7e4..6fa20161 100644 --- a/tests/Doc/Bf_tutorial.cs +++ b/tests/Doc/Bf_tutorial.cs @@ -16,7 +16,7 @@ namespace Doc; public class Bf_tutorial : AbstractNRedisStackTest, IDisposable { public Bf_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/Bitmap_tutorial.cs b/tests/Doc/Bitmap_tutorial.cs index 8767f463..fa375ec3 100644 --- a/tests/Doc/Bitmap_tutorial.cs +++ b/tests/Doc/Bitmap_tutorial.cs @@ -15,7 +15,7 @@ namespace Doc; public class Bitmap_tutorial : AbstractNRedisStackTest, IDisposable { public Bitmap_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/CmdsHashExample.cs b/tests/Doc/CmdsHashExample.cs index ff1a9bf1..93d28741 100644 --- a/tests/Doc/CmdsHashExample.cs +++ b/tests/Doc/CmdsHashExample.cs @@ -10,10 +10,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsHashExample: AbstractNRedisStackTest, IDisposable +public class CmdsHashExample : AbstractNRedisStackTest, IDisposable { public CmdsHashExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/CmdsSortedSetExamples.cs b/tests/Doc/CmdsSortedSetExamples.cs index abfda108..f6118c76 100644 --- a/tests/Doc/CmdsSortedSetExamples.cs +++ b/tests/Doc/CmdsSortedSetExamples.cs @@ -12,10 +12,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsSortedSet: AbstractNRedisStackTest, IDisposable +public class CmdsSortedSet : AbstractNRedisStackTest, IDisposable { public CmdsSortedSet(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/CmdsStringExample.cs b/tests/Doc/CmdsStringExample.cs index 5985ced4..ce1dfcc0 100644 --- a/tests/Doc/CmdsStringExample.cs +++ b/tests/Doc/CmdsStringExample.cs @@ -12,10 +12,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsStringExample: AbstractNRedisStackTest, IDisposable +public class CmdsStringExample : AbstractNRedisStackTest, IDisposable { public CmdsStringExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/Cms_tutorial.cs b/tests/Doc/Cms_tutorial.cs index 8aa1fd5c..f820ab13 100644 --- a/tests/Doc/Cms_tutorial.cs +++ b/tests/Doc/Cms_tutorial.cs @@ -17,7 +17,7 @@ namespace Doc; public class Cms_tutorial : AbstractNRedisStackTest, IDisposable { public Cms_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/Cuckoo_tutorial.cs b/tests/Doc/Cuckoo_tutorial.cs index c688005f..14b312ed 100644 --- a/tests/Doc/Cuckoo_tutorial.cs +++ b/tests/Doc/Cuckoo_tutorial.cs @@ -16,7 +16,7 @@ namespace Doc; public class Cuckoo_tutorial : AbstractNRedisStackTest, IDisposable { public Cuckoo_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/Geo_tutorial.cs b/tests/Doc/Geo_tutorial.cs index a29a77c7..e7b887ca 100644 --- a/tests/Doc/Geo_tutorial.cs +++ b/tests/Doc/Geo_tutorial.cs @@ -15,7 +15,7 @@ namespace Doc; public class Geo_tutorial : AbstractNRedisStackTest, IDisposable { public Geo_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/HashExample.cs b/tests/Doc/HashExample.cs index eec1b324..86254e20 100644 --- a/tests/Doc/HashExample.cs +++ b/tests/Doc/HashExample.cs @@ -8,10 +8,10 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class HashExample: AbstractNRedisStackTest, IDisposable +public class HashExample : AbstractNRedisStackTest, IDisposable { public HashExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/Hll_tutorial.cs b/tests/Doc/Hll_tutorial.cs index 2ead95c2..95289e5d 100644 --- a/tests/Doc/Hll_tutorial.cs +++ b/tests/Doc/Hll_tutorial.cs @@ -15,7 +15,7 @@ namespace Doc; public class Hll_tutorial : AbstractNRedisStackTest, IDisposable { public Hll_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/HomeJsonExample.cs b/tests/Doc/HomeJsonExample.cs index 04151a0b..91cf3f6e 100644 --- a/tests/Doc/HomeJsonExample.cs +++ b/tests/Doc/HomeJsonExample.cs @@ -16,10 +16,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class HomeJsonExample: AbstractNRedisStackTest, IDisposable +public class HomeJsonExample : AbstractNRedisStackTest, IDisposable { public HomeJsonExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/Json_tutorial.cs b/tests/Doc/Json_tutorial.cs index 53b8c73e..c51ed87c 100644 --- a/tests/Doc/Json_tutorial.cs +++ b/tests/Doc/Json_tutorial.cs @@ -17,7 +17,7 @@ namespace Doc; public class Json_tutorial : AbstractNRedisStackTest, IDisposable { public Json_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/ListTutorial.cs b/tests/Doc/ListTutorial.cs index 739f59dd..a4f98167 100644 --- a/tests/Doc/ListTutorial.cs +++ b/tests/Doc/ListTutorial.cs @@ -11,10 +11,10 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class ListExample: AbstractNRedisStackTest, IDisposable +public class ListExample : AbstractNRedisStackTest, IDisposable { public ListExample(EndpointsFixture fixture) : base(fixture) { } - + //REMOVE_START [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] diff --git a/tests/Doc/QueryAggExample.cs b/tests/Doc/QueryAggExample.cs index 99505536..deb8a367 100644 --- a/tests/Doc/QueryAggExample.cs +++ b/tests/Doc/QueryAggExample.cs @@ -16,10 +16,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryAggExample: AbstractNRedisStackTest, IDisposable +public class QueryAggExample : AbstractNRedisStackTest, IDisposable { public QueryAggExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/QueryEmExample.cs b/tests/Doc/QueryEmExample.cs index 143aec49..8a088fab 100644 --- a/tests/Doc/QueryEmExample.cs +++ b/tests/Doc/QueryEmExample.cs @@ -15,10 +15,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryEmExample: AbstractNRedisStackTest, IDisposable +public class QueryEmExample : AbstractNRedisStackTest, IDisposable { public QueryEmExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/QueryFtExample.cs b/tests/Doc/QueryFtExample.cs index 60addb3b..e7a5a330 100644 --- a/tests/Doc/QueryFtExample.cs +++ b/tests/Doc/QueryFtExample.cs @@ -15,10 +15,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryFtExample: AbstractNRedisStackTest, IDisposable +public class QueryFtExample : AbstractNRedisStackTest, IDisposable { public QueryFtExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/QueryRangeExample.cs b/tests/Doc/QueryRangeExample.cs index 1f2ace35..f4a7b704 100644 --- a/tests/Doc/QueryRangeExample.cs +++ b/tests/Doc/QueryRangeExample.cs @@ -15,10 +15,10 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryRangeExample: AbstractNRedisStackTest, IDisposable +public class QueryRangeExample : AbstractNRedisStackTest, IDisposable { public QueryRangeExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/SearchQuickstartExample.cs b/tests/Doc/SearchQuickstartExample.cs index b1d6072f..b5714a78 100644 --- a/tests/Doc/SearchQuickstartExample.cs +++ b/tests/Doc/SearchQuickstartExample.cs @@ -11,17 +11,16 @@ namespace Doc; [Collection("DocsTests")] // REMOVE_END -public class SearchQuickstartExample: AbstractNRedisStackTest, IDisposable +public class SearchQuickstartExample : AbstractNRedisStackTest, IDisposable { public SearchQuickstartExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) { // STEP_START connect - var redis = ConnectionMultiplexer.Connect("localhost:6379"); - var db = redis.GetDatabase(); + var db = GetCleanDatabase(endpointId); var ft = db.FT(); var json = db.JSON(); // STEP_END diff --git a/tests/Doc/SetGetExample.cs b/tests/Doc/SetGetExample.cs index 7b812965..7270186c 100644 --- a/tests/Doc/SetGetExample.cs +++ b/tests/Doc/SetGetExample.cs @@ -8,16 +8,15 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SetGetExample: AbstractNRedisStackTest, IDisposable +public class SetGetExample : AbstractNRedisStackTest, IDisposable { public SetGetExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) { - var redis = ConnectionMultiplexer.Connect("localhost:6379"); - var db = redis.GetDatabase(); + var db = GetCleanDatabase(endpointId); //HIDE_END bool status = db.StringSet("bike:1", "Process 134"); diff --git a/tests/Doc/SetsTutorial.cs b/tests/Doc/SetsTutorial.cs index ee56b73d..df80b9c8 100644 --- a/tests/Doc/SetsTutorial.cs +++ b/tests/Doc/SetsTutorial.cs @@ -13,10 +13,10 @@ namespace Doc; //REMOVE_END // HIDE_START -public class SetsExample: AbstractNRedisStackTest, IDisposable +public class SetsExample : AbstractNRedisStackTest, IDisposable { public SetsExample(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/SortedSetExample.cs b/tests/Doc/SortedSetExample.cs index 8417a2bd..0fdce0d0 100644 --- a/tests/Doc/SortedSetExample.cs +++ b/tests/Doc/SortedSetExample.cs @@ -9,10 +9,10 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SortedSetExample: AbstractNRedisStackTest, IDisposable +public class SortedSetExample : AbstractNRedisStackTest, IDisposable { public SortedSetExample(EndpointsFixture fixture) : base(fixture) { } - + //REMOVE_START [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] diff --git a/tests/Doc/StringSnippets.cs b/tests/Doc/StringSnippets.cs index ec636bf2..e1f430f4 100644 --- a/tests/Doc/StringSnippets.cs +++ b/tests/Doc/StringSnippets.cs @@ -19,8 +19,7 @@ public StringSnippets(EndpointsFixture fixture) : base(fixture) { } //REMOVE_END public void run(string endpointId) { - var redis = ConnectionMultiplexer.Connect("localhost:6379"); - var db = redis.GetDatabase(); + var db = GetCleanDatabase(endpointId); //HIDE_END diff --git a/tests/Doc/Tdigest_tutorial.cs b/tests/Doc/Tdigest_tutorial.cs index 803636c8..9a8d8ae3 100644 --- a/tests/Doc/Tdigest_tutorial.cs +++ b/tests/Doc/Tdigest_tutorial.cs @@ -16,7 +16,7 @@ namespace Doc; public class Tdigest_tutorial : AbstractNRedisStackTest, IDisposable { public Tdigest_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) diff --git a/tests/Doc/Topk_tutorial.cs b/tests/Doc/Topk_tutorial.cs index 80d6b621..899d0d6c 100644 --- a/tests/Doc/Topk_tutorial.cs +++ b/tests/Doc/Topk_tutorial.cs @@ -16,7 +16,7 @@ namespace Doc; public class Topk_tutorial : AbstractNRedisStackTest, IDisposable { public Topk_tutorial(EndpointsFixture fixture) : base(fixture) { } - + [SkippableTheory] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public void run(string endpointId) From 8b9ae3da7b8636af1ea52374bc499d0fed6ae741 Mon Sep 17 00:00:00 2001 From: atakavci Date: Tue, 11 Feb 2025 16:51:21 +0300 Subject: [PATCH 3/7] fix tests to include in integration pipeline --- tests/Doc/Bf_tutorial.cs | 20 +++++++++++++++----- tests/Doc/Bitmap_tutorial.cs | 21 ++++++++++++++++----- tests/Doc/CmdsGenericExample.cs | 18 +++++++++++++++--- tests/Doc/CmdsHashExample.cs | 21 ++++++++++++++++----- tests/Doc/CmdsSortedSetExamples.cs | 21 ++++++++++++++++----- tests/Doc/CmdsStringExample.cs | 21 ++++++++++++++++----- tests/Doc/Cms_tutorial.cs | 21 ++++++++++++++++----- tests/Doc/Cuckoo_tutorial.cs | 21 ++++++++++++++++----- tests/Doc/Geo_tutorial.cs | 21 ++++++++++++++++----- tests/Doc/HashExample.cs | 21 ++++++++++++++++----- tests/Doc/Hll_tutorial.cs | 21 ++++++++++++++++----- tests/Doc/HomeJsonExample.cs | 23 +++++++++++++++++------ tests/Doc/Json_tutorial.cs | 21 ++++++++++++++++----- tests/Doc/ListTutorial.cs | 23 ++++++++++++++++------- tests/Doc/QueryAggExample.cs | 21 ++++++++++++++++----- tests/Doc/QueryEmExample.cs | 21 ++++++++++++++++----- tests/Doc/QueryFtExample.cs | 21 ++++++++++++++++----- tests/Doc/QueryRangeExample.cs | 21 ++++++++++++++++----- tests/Doc/SearchQuickstartExample.cs | 21 ++++++++++++++++----- tests/Doc/SetGetExample.cs | 21 ++++++++++++++++----- tests/Doc/SetsTutorial.cs | 21 ++++++++++++++++----- tests/Doc/SortedSetExample.cs | 23 ++++++++++++++++------- tests/Doc/StreamTutorial.cs | 23 +++++++++++++++++------ tests/Doc/StringSnippets.cs | 23 ++++++++++++++++------- tests/Doc/Tdigest_tutorial.cs | 21 ++++++++++++++++----- tests/Doc/Topk_tutorial.cs | 21 ++++++++++++++++----- 26 files changed, 416 insertions(+), 136 deletions(-) diff --git a/tests/Doc/Bf_tutorial.cs b/tests/Doc/Bf_tutorial.cs index 6fa20161..828c553d 100644 --- a/tests/Doc/Bf_tutorial.cs +++ b/tests/Doc/Bf_tutorial.cs @@ -13,15 +13,25 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Bf_tutorial : AbstractNRedisStackTest, IDisposable +public class Bf_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START public Bf_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:models"); diff --git a/tests/Doc/Bitmap_tutorial.cs b/tests/Doc/Bitmap_tutorial.cs index fa375ec3..839e085e 100644 --- a/tests/Doc/Bitmap_tutorial.cs +++ b/tests/Doc/Bitmap_tutorial.cs @@ -12,15 +12,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Bitmap_tutorial : AbstractNRedisStackTest, IDisposable +public class Bitmap_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Bitmap_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("pings:2024-01-01-00:00"); diff --git a/tests/Doc/CmdsGenericExample.cs b/tests/Doc/CmdsGenericExample.cs index 83382533..3d89756e 100644 --- a/tests/Doc/CmdsGenericExample.cs +++ b/tests/Doc/CmdsGenericExample.cs @@ -12,17 +12,29 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsGenericExample : AbstractNRedisStackTest, IDisposable +public class CmdsGenericExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public CmdsGenericExample(EndpointsFixture fixture) : base(fixture) { } [SkipIfRedis(Comparison.LessThan, "7.0.0")] [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. diff --git a/tests/Doc/CmdsHashExample.cs b/tests/Doc/CmdsHashExample.cs index 93d28741..c3a44e5f 100644 --- a/tests/Doc/CmdsHashExample.cs +++ b/tests/Doc/CmdsHashExample.cs @@ -10,15 +10,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsHashExample : AbstractNRedisStackTest, IDisposable +public class CmdsHashExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public CmdsHashExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("myhash"); diff --git a/tests/Doc/CmdsSortedSetExamples.cs b/tests/Doc/CmdsSortedSetExamples.cs index f6118c76..c2a5dc22 100644 --- a/tests/Doc/CmdsSortedSetExamples.cs +++ b/tests/Doc/CmdsSortedSetExamples.cs @@ -12,15 +12,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsSortedSet : AbstractNRedisStackTest, IDisposable +public class CmdsSortedSet +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public CmdsSortedSet(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. diff --git a/tests/Doc/CmdsStringExample.cs b/tests/Doc/CmdsStringExample.cs index ce1dfcc0..6f5b7a3d 100644 --- a/tests/Doc/CmdsStringExample.cs +++ b/tests/Doc/CmdsStringExample.cs @@ -12,15 +12,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsStringExample : AbstractNRedisStackTest, IDisposable +public class CmdsStringExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public CmdsStringExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. diff --git a/tests/Doc/Cms_tutorial.cs b/tests/Doc/Cms_tutorial.cs index f820ab13..da4f0cee 100644 --- a/tests/Doc/Cms_tutorial.cs +++ b/tests/Doc/Cms_tutorial.cs @@ -14,15 +14,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Cms_tutorial : AbstractNRedisStackTest, IDisposable +public class Cms_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Cms_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:profit"); diff --git a/tests/Doc/Cuckoo_tutorial.cs b/tests/Doc/Cuckoo_tutorial.cs index 14b312ed..856b851b 100644 --- a/tests/Doc/Cuckoo_tutorial.cs +++ b/tests/Doc/Cuckoo_tutorial.cs @@ -13,15 +13,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Cuckoo_tutorial : AbstractNRedisStackTest, IDisposable +public class Cuckoo_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Cuckoo_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:models"); diff --git a/tests/Doc/Geo_tutorial.cs b/tests/Doc/Geo_tutorial.cs index e7b887ca..9da51583 100644 --- a/tests/Doc/Geo_tutorial.cs +++ b/tests/Doc/Geo_tutorial.cs @@ -12,15 +12,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Geo_tutorial : AbstractNRedisStackTest, IDisposable +public class Geo_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Geo_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:rentable"); diff --git a/tests/Doc/HashExample.cs b/tests/Doc/HashExample.cs index 86254e20..a055b5ae 100644 --- a/tests/Doc/HashExample.cs +++ b/tests/Doc/HashExample.cs @@ -8,15 +8,26 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class HashExample : AbstractNRedisStackTest, IDisposable +public class HashExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public HashExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); db.KeyDelete("bike:1"); //HIDE_END //STEP_START set_get_all diff --git a/tests/Doc/Hll_tutorial.cs b/tests/Doc/Hll_tutorial.cs index 95289e5d..38748640 100644 --- a/tests/Doc/Hll_tutorial.cs +++ b/tests/Doc/Hll_tutorial.cs @@ -12,15 +12,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Hll_tutorial : AbstractNRedisStackTest, IDisposable +public class Hll_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Hll_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete(new RedisKey[] { "{bikes}", "commuter_{bikes}", "all_{bikes}" }); diff --git a/tests/Doc/HomeJsonExample.cs b/tests/Doc/HomeJsonExample.cs index 91cf3f6e..1434dfcd 100644 --- a/tests/Doc/HomeJsonExample.cs +++ b/tests/Doc/HomeJsonExample.cs @@ -16,17 +16,28 @@ namespace Doc; // REMOVE_END // HIDE_START -public class HomeJsonExample : AbstractNRedisStackTest, IDisposable +public class HomeJsonExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public HomeJsonExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - // STEP_START connect + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END - var db = GetCleanDatabase(endpointId); + // STEP_START connect + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); // STEP_END //REMOVE_START diff --git a/tests/Doc/Json_tutorial.cs b/tests/Doc/Json_tutorial.cs index c51ed87c..134b05cc 100644 --- a/tests/Doc/Json_tutorial.cs +++ b/tests/Doc/Json_tutorial.cs @@ -14,15 +14,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Json_tutorial : AbstractNRedisStackTest, IDisposable +public class Json_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Json_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bike"); diff --git a/tests/Doc/ListTutorial.cs b/tests/Doc/ListTutorial.cs index a4f98167..55d88653 100644 --- a/tests/Doc/ListTutorial.cs +++ b/tests/Doc/ListTutorial.cs @@ -11,17 +11,26 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class ListExample : AbstractNRedisStackTest, IDisposable +public class ListExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public ListExample(EndpointsFixture fixture) : base(fixture) { } - //REMOVE_START - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - //REMOVE_END - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //HIDE_END //REMOVE_START db.KeyDelete("bikes:repairs"); diff --git a/tests/Doc/QueryAggExample.cs b/tests/Doc/QueryAggExample.cs index deb8a367..57088037 100644 --- a/tests/Doc/QueryAggExample.cs +++ b/tests/Doc/QueryAggExample.cs @@ -16,15 +16,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryAggExample : AbstractNRedisStackTest, IDisposable +public class QueryAggExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public QueryAggExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle"); } catch { } diff --git a/tests/Doc/QueryEmExample.cs b/tests/Doc/QueryEmExample.cs index 8a088fab..b61baa25 100644 --- a/tests/Doc/QueryEmExample.cs +++ b/tests/Doc/QueryEmExample.cs @@ -15,15 +15,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryEmExample : AbstractNRedisStackTest, IDisposable +public class QueryEmExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public QueryEmExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle"); } catch { } diff --git a/tests/Doc/QueryFtExample.cs b/tests/Doc/QueryFtExample.cs index e7a5a330..94a0d504 100644 --- a/tests/Doc/QueryFtExample.cs +++ b/tests/Doc/QueryFtExample.cs @@ -15,15 +15,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryFtExample : AbstractNRedisStackTest, IDisposable +public class QueryFtExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public QueryFtExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle", true); } catch { } diff --git a/tests/Doc/QueryRangeExample.cs b/tests/Doc/QueryRangeExample.cs index f4a7b704..87550fbb 100644 --- a/tests/Doc/QueryRangeExample.cs +++ b/tests/Doc/QueryRangeExample.cs @@ -15,15 +15,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryRangeExample : AbstractNRedisStackTest, IDisposable +public class QueryRangeExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public QueryRangeExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. try { db.FT().DropIndex("idx:bicycle", dd: true); } catch { } diff --git a/tests/Doc/SearchQuickstartExample.cs b/tests/Doc/SearchQuickstartExample.cs index b5714a78..3827e647 100644 --- a/tests/Doc/SearchQuickstartExample.cs +++ b/tests/Doc/SearchQuickstartExample.cs @@ -11,16 +11,27 @@ namespace Doc; [Collection("DocsTests")] // REMOVE_END -public class SearchQuickstartExample : AbstractNRedisStackTest, IDisposable +public class SearchQuickstartExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public SearchQuickstartExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END // STEP_START connect - var db = GetCleanDatabase(endpointId); + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); var ft = db.FT(); var json = db.JSON(); // STEP_END diff --git a/tests/Doc/SetGetExample.cs b/tests/Doc/SetGetExample.cs index 7270186c..7cf560a4 100644 --- a/tests/Doc/SetGetExample.cs +++ b/tests/Doc/SetGetExample.cs @@ -8,15 +8,26 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SetGetExample : AbstractNRedisStackTest, IDisposable +public class SetGetExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public SetGetExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //HIDE_END bool status = db.StringSet("bike:1", "Process 134"); diff --git a/tests/Doc/SetsTutorial.cs b/tests/Doc/SetsTutorial.cs index df80b9c8..42fcda13 100644 --- a/tests/Doc/SetsTutorial.cs +++ b/tests/Doc/SetsTutorial.cs @@ -13,15 +13,26 @@ namespace Doc; //REMOVE_END // HIDE_START -public class SetsExample : AbstractNRedisStackTest, IDisposable +public class SetsExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public SetsExample(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. bool delRes = db.KeyDelete("bikes:racing:france"); diff --git a/tests/Doc/SortedSetExample.cs b/tests/Doc/SortedSetExample.cs index 0fdce0d0..561e950d 100644 --- a/tests/Doc/SortedSetExample.cs +++ b/tests/Doc/SortedSetExample.cs @@ -9,17 +9,26 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SortedSetExample : AbstractNRedisStackTest, IDisposable +public class SortedSetExample +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public SortedSetExample(EndpointsFixture fixture) : base(fixture) { } - //REMOVE_START - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - //REMOVE_END - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START db.KeyDelete("racer_scores"); //REMOVE_END diff --git a/tests/Doc/StreamTutorial.cs b/tests/Doc/StreamTutorial.cs index 3d08379b..7a8c5e62 100644 --- a/tests/Doc/StreamTutorial.cs +++ b/tests/Doc/StreamTutorial.cs @@ -13,15 +13,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class StreamTutorial : AbstractNRedisStackTest, IDisposable +public class StreamTutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public StreamTutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("race:france"); @@ -191,7 +202,7 @@ public void run(string endpointId) // STEP_START xadd_7 RedisValue res11 = ""; - Version version = GetConnection(endpointId).GetServers()[0].Version; + Version version = GetConnection("localhost:6379").GetServers()[0].Version; if (version.Major >= 7) { res11 = db.StreamAdd( diff --git a/tests/Doc/StringSnippets.cs b/tests/Doc/StringSnippets.cs index e1f430f4..5a48d2b8 100644 --- a/tests/Doc/StringSnippets.cs +++ b/tests/Doc/StringSnippets.cs @@ -9,17 +9,26 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class StringSnippets : AbstractNRedisStackTest, IDisposable +public class StringSnippets +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public StringSnippets(EndpointsFixture fixture) : base(fixture) { } - //REMOVE_START - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - //REMOVE_END - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //HIDE_END diff --git a/tests/Doc/Tdigest_tutorial.cs b/tests/Doc/Tdigest_tutorial.cs index 9a8d8ae3..b96d9e4f 100644 --- a/tests/Doc/Tdigest_tutorial.cs +++ b/tests/Doc/Tdigest_tutorial.cs @@ -13,15 +13,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Tdigest_tutorial : AbstractNRedisStackTest, IDisposable +public class Tdigest_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Tdigest_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("racer_ages"); diff --git a/tests/Doc/Topk_tutorial.cs b/tests/Doc/Topk_tutorial.cs index 899d0d6c..e929bc95 100644 --- a/tests/Doc/Topk_tutorial.cs +++ b/tests/Doc/Topk_tutorial.cs @@ -13,15 +13,26 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Topk_tutorial : AbstractNRedisStackTest, IDisposable +public class Topk_tutorial +// REMOVE_START +: AbstractNRedisStackTest, IDisposable +// REMOVE_END { + // REMOVE_START + public Topk_tutorial(EndpointsFixture fixture) : base(fixture) { } - [SkippableTheory] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - public void run(string endpointId) + [SkippableFact] + // REMOVE_END + public void run() { - var db = GetCleanDatabase(endpointId); + //REMOVE_START + // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection + SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); + var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + //REMOVE_END + var muxer = ConnectionMultiplexer.Connect("localhost:6379"); + var db = muxer.GetDatabase(); //REMOVE_START // Clear any keys here before using them in tests. db.KeyDelete("bikes:keywords"); From d431c2d6d471cfd91129654aa9f2ce1a5f8f9440 Mon Sep 17 00:00:00 2001 From: atakavci Date: Tue, 11 Feb 2025 17:09:46 +0300 Subject: [PATCH 4/7] fix formatting --- tests/Doc/Bitmap_tutorial.cs | 2 +- tests/Doc/CmdsGenericExample.cs | 2 +- tests/Doc/CmdsHashExample.cs | 2 +- tests/Doc/CmdsSortedSetExamples.cs | 2 +- tests/Doc/CmdsStringExample.cs | 2 +- tests/Doc/Cms_tutorial.cs | 2 +- tests/Doc/Cuckoo_tutorial.cs | 2 +- tests/Doc/Geo_tutorial.cs | 2 +- tests/Doc/HashExample.cs | 2 +- tests/Doc/Hll_tutorial.cs | 2 +- tests/Doc/Json_tutorial.cs | 2 +- tests/Doc/ListTutorial.cs | 2 +- tests/Doc/QueryAggExample.cs | 2 +- tests/Doc/QueryEmExample.cs | 2 +- tests/Doc/QueryFtExample.cs | 2 +- tests/Doc/QueryRangeExample.cs | 2 +- tests/Doc/SetGetExample.cs | 2 +- tests/Doc/SetsTutorial.cs | 2 +- tests/Doc/SortedSetExample.cs | 2 +- tests/Doc/StreamTutorial.cs | 2 +- tests/Doc/StringSnippets.cs | 2 +- tests/Doc/Tdigest_tutorial.cs | 2 +- tests/Doc/Topk_tutorial.cs | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/Doc/Bitmap_tutorial.cs b/tests/Doc/Bitmap_tutorial.cs index 839e085e..c8f92a64 100644 --- a/tests/Doc/Bitmap_tutorial.cs +++ b/tests/Doc/Bitmap_tutorial.cs @@ -12,7 +12,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Bitmap_tutorial +public class Bitmap_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/CmdsGenericExample.cs b/tests/Doc/CmdsGenericExample.cs index 3d89756e..3c2cfe7f 100644 --- a/tests/Doc/CmdsGenericExample.cs +++ b/tests/Doc/CmdsGenericExample.cs @@ -26,7 +26,7 @@ public CmdsGenericExample(EndpointsFixture fixture) : base(fixture) { } [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] // REMOVE_END - public void run() + public void run(string endpoint = "standalone") { //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection diff --git a/tests/Doc/CmdsHashExample.cs b/tests/Doc/CmdsHashExample.cs index c3a44e5f..18b022dc 100644 --- a/tests/Doc/CmdsHashExample.cs +++ b/tests/Doc/CmdsHashExample.cs @@ -10,7 +10,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsHashExample +public class CmdsHashExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/CmdsSortedSetExamples.cs b/tests/Doc/CmdsSortedSetExamples.cs index c2a5dc22..3c8fb064 100644 --- a/tests/Doc/CmdsSortedSetExamples.cs +++ b/tests/Doc/CmdsSortedSetExamples.cs @@ -12,7 +12,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsSortedSet +public class CmdsSortedSet // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/CmdsStringExample.cs b/tests/Doc/CmdsStringExample.cs index 6f5b7a3d..d307d510 100644 --- a/tests/Doc/CmdsStringExample.cs +++ b/tests/Doc/CmdsStringExample.cs @@ -12,7 +12,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class CmdsStringExample +public class CmdsStringExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/Cms_tutorial.cs b/tests/Doc/Cms_tutorial.cs index da4f0cee..b3d609e8 100644 --- a/tests/Doc/Cms_tutorial.cs +++ b/tests/Doc/Cms_tutorial.cs @@ -14,7 +14,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Cms_tutorial +public class Cms_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/Cuckoo_tutorial.cs b/tests/Doc/Cuckoo_tutorial.cs index 856b851b..6539a91f 100644 --- a/tests/Doc/Cuckoo_tutorial.cs +++ b/tests/Doc/Cuckoo_tutorial.cs @@ -13,7 +13,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Cuckoo_tutorial +public class Cuckoo_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/Geo_tutorial.cs b/tests/Doc/Geo_tutorial.cs index 9da51583..4aae5d8e 100644 --- a/tests/Doc/Geo_tutorial.cs +++ b/tests/Doc/Geo_tutorial.cs @@ -12,7 +12,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Geo_tutorial +public class Geo_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/HashExample.cs b/tests/Doc/HashExample.cs index a055b5ae..5692b3ac 100644 --- a/tests/Doc/HashExample.cs +++ b/tests/Doc/HashExample.cs @@ -8,7 +8,7 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class HashExample +public class HashExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/Hll_tutorial.cs b/tests/Doc/Hll_tutorial.cs index 38748640..5c635457 100644 --- a/tests/Doc/Hll_tutorial.cs +++ b/tests/Doc/Hll_tutorial.cs @@ -12,7 +12,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Hll_tutorial +public class Hll_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/Json_tutorial.cs b/tests/Doc/Json_tutorial.cs index 134b05cc..2740ea0b 100644 --- a/tests/Doc/Json_tutorial.cs +++ b/tests/Doc/Json_tutorial.cs @@ -14,7 +14,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Json_tutorial +public class Json_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/ListTutorial.cs b/tests/Doc/ListTutorial.cs index 55d88653..3ee18e2c 100644 --- a/tests/Doc/ListTutorial.cs +++ b/tests/Doc/ListTutorial.cs @@ -11,7 +11,7 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class ListExample +public class ListExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/QueryAggExample.cs b/tests/Doc/QueryAggExample.cs index 57088037..4ec65d4a 100644 --- a/tests/Doc/QueryAggExample.cs +++ b/tests/Doc/QueryAggExample.cs @@ -16,7 +16,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryAggExample +public class QueryAggExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/QueryEmExample.cs b/tests/Doc/QueryEmExample.cs index b61baa25..52eb9e53 100644 --- a/tests/Doc/QueryEmExample.cs +++ b/tests/Doc/QueryEmExample.cs @@ -15,7 +15,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryEmExample +public class QueryEmExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/QueryFtExample.cs b/tests/Doc/QueryFtExample.cs index 94a0d504..e9f709c2 100644 --- a/tests/Doc/QueryFtExample.cs +++ b/tests/Doc/QueryFtExample.cs @@ -15,7 +15,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryFtExample +public class QueryFtExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/QueryRangeExample.cs b/tests/Doc/QueryRangeExample.cs index 87550fbb..931bf3f9 100644 --- a/tests/Doc/QueryRangeExample.cs +++ b/tests/Doc/QueryRangeExample.cs @@ -15,7 +15,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class QueryRangeExample +public class QueryRangeExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/SetGetExample.cs b/tests/Doc/SetGetExample.cs index 7cf560a4..1c61c505 100644 --- a/tests/Doc/SetGetExample.cs +++ b/tests/Doc/SetGetExample.cs @@ -8,7 +8,7 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SetGetExample +public class SetGetExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/SetsTutorial.cs b/tests/Doc/SetsTutorial.cs index 42fcda13..ba55c646 100644 --- a/tests/Doc/SetsTutorial.cs +++ b/tests/Doc/SetsTutorial.cs @@ -13,7 +13,7 @@ namespace Doc; //REMOVE_END // HIDE_START -public class SetsExample +public class SetsExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/SortedSetExample.cs b/tests/Doc/SortedSetExample.cs index 561e950d..517ec555 100644 --- a/tests/Doc/SortedSetExample.cs +++ b/tests/Doc/SortedSetExample.cs @@ -9,7 +9,7 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class SortedSetExample +public class SortedSetExample // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/StreamTutorial.cs b/tests/Doc/StreamTutorial.cs index 7a8c5e62..28eb6a8b 100644 --- a/tests/Doc/StreamTutorial.cs +++ b/tests/Doc/StreamTutorial.cs @@ -13,7 +13,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class StreamTutorial +public class StreamTutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/StringSnippets.cs b/tests/Doc/StringSnippets.cs index 5a48d2b8..c32c4fee 100644 --- a/tests/Doc/StringSnippets.cs +++ b/tests/Doc/StringSnippets.cs @@ -9,7 +9,7 @@ namespace Doc; [Collection("DocsTests")] //REMOVE_END -public class StringSnippets +public class StringSnippets // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/Tdigest_tutorial.cs b/tests/Doc/Tdigest_tutorial.cs index b96d9e4f..608f6f05 100644 --- a/tests/Doc/Tdigest_tutorial.cs +++ b/tests/Doc/Tdigest_tutorial.cs @@ -13,7 +13,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Tdigest_tutorial +public class Tdigest_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END diff --git a/tests/Doc/Topk_tutorial.cs b/tests/Doc/Topk_tutorial.cs index e929bc95..0e53a8b8 100644 --- a/tests/Doc/Topk_tutorial.cs +++ b/tests/Doc/Topk_tutorial.cs @@ -13,7 +13,7 @@ namespace Doc; // REMOVE_END // HIDE_START -public class Topk_tutorial +public class Topk_tutorial // REMOVE_START : AbstractNRedisStackTest, IDisposable // REMOVE_END From c733dc28701e7a10fca43170a5d1b8d9013e49e3 Mon Sep 17 00:00:00 2001 From: atakavci Date: Tue, 11 Feb 2025 17:14:09 +0300 Subject: [PATCH 5/7] rename dummy var --- tests/Doc/Bf_tutorial.cs | 2 +- tests/Doc/Bitmap_tutorial.cs | 2 +- tests/Doc/CmdsGenericExample.cs | 2 +- tests/Doc/CmdsHashExample.cs | 2 +- tests/Doc/CmdsSortedSetExamples.cs | 2 +- tests/Doc/CmdsStringExample.cs | 2 +- tests/Doc/Cms_tutorial.cs | 2 +- tests/Doc/Cuckoo_tutorial.cs | 2 +- tests/Doc/Geo_tutorial.cs | 2 +- tests/Doc/HashExample.cs | 2 +- tests/Doc/Hll_tutorial.cs | 2 +- tests/Doc/HomeJsonExample.cs | 2 +- tests/Doc/Json_tutorial.cs | 2 +- tests/Doc/ListTutorial.cs | 2 +- tests/Doc/QueryAggExample.cs | 2 +- tests/Doc/QueryEmExample.cs | 2 +- tests/Doc/QueryFtExample.cs | 2 +- tests/Doc/QueryRangeExample.cs | 2 +- tests/Doc/SearchQuickstartExample.cs | 2 +- tests/Doc/SetGetExample.cs | 2 +- tests/Doc/SetsTutorial.cs | 2 +- tests/Doc/SortedSetExample.cs | 2 +- tests/Doc/StreamTutorial.cs | 2 +- tests/Doc/StringSnippets.cs | 2 +- tests/Doc/Tdigest_tutorial.cs | 2 +- tests/Doc/Topk_tutorial.cs | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/Doc/Bf_tutorial.cs b/tests/Doc/Bf_tutorial.cs index 828c553d..efe29630 100644 --- a/tests/Doc/Bf_tutorial.cs +++ b/tests/Doc/Bf_tutorial.cs @@ -28,7 +28,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/Bitmap_tutorial.cs b/tests/Doc/Bitmap_tutorial.cs index c8f92a64..4659fe8f 100644 --- a/tests/Doc/Bitmap_tutorial.cs +++ b/tests/Doc/Bitmap_tutorial.cs @@ -28,7 +28,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/CmdsGenericExample.cs b/tests/Doc/CmdsGenericExample.cs index 3c2cfe7f..e175a83a 100644 --- a/tests/Doc/CmdsGenericExample.cs +++ b/tests/Doc/CmdsGenericExample.cs @@ -31,7 +31,7 @@ public void run(string endpoint = "standalone") //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/CmdsHashExample.cs b/tests/Doc/CmdsHashExample.cs index 18b022dc..09fafdfc 100644 --- a/tests/Doc/CmdsHashExample.cs +++ b/tests/Doc/CmdsHashExample.cs @@ -26,7 +26,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/CmdsSortedSetExamples.cs b/tests/Doc/CmdsSortedSetExamples.cs index 3c8fb064..f4e8009b 100644 --- a/tests/Doc/CmdsSortedSetExamples.cs +++ b/tests/Doc/CmdsSortedSetExamples.cs @@ -28,7 +28,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/CmdsStringExample.cs b/tests/Doc/CmdsStringExample.cs index d307d510..fc1c4fa4 100644 --- a/tests/Doc/CmdsStringExample.cs +++ b/tests/Doc/CmdsStringExample.cs @@ -28,7 +28,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/Cms_tutorial.cs b/tests/Doc/Cms_tutorial.cs index b3d609e8..a48927d1 100644 --- a/tests/Doc/Cms_tutorial.cs +++ b/tests/Doc/Cms_tutorial.cs @@ -30,7 +30,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/Cuckoo_tutorial.cs b/tests/Doc/Cuckoo_tutorial.cs index 6539a91f..2613b627 100644 --- a/tests/Doc/Cuckoo_tutorial.cs +++ b/tests/Doc/Cuckoo_tutorial.cs @@ -29,7 +29,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/Geo_tutorial.cs b/tests/Doc/Geo_tutorial.cs index 4aae5d8e..a66a64df 100644 --- a/tests/Doc/Geo_tutorial.cs +++ b/tests/Doc/Geo_tutorial.cs @@ -28,7 +28,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/HashExample.cs b/tests/Doc/HashExample.cs index 5692b3ac..cdf3f5de 100644 --- a/tests/Doc/HashExample.cs +++ b/tests/Doc/HashExample.cs @@ -24,7 +24,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/Hll_tutorial.cs b/tests/Doc/Hll_tutorial.cs index 5c635457..f930bcce 100644 --- a/tests/Doc/Hll_tutorial.cs +++ b/tests/Doc/Hll_tutorial.cs @@ -28,7 +28,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/HomeJsonExample.cs b/tests/Doc/HomeJsonExample.cs index 1434dfcd..760fadf3 100644 --- a/tests/Doc/HomeJsonExample.cs +++ b/tests/Doc/HomeJsonExample.cs @@ -32,7 +32,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END // STEP_START connect diff --git a/tests/Doc/Json_tutorial.cs b/tests/Doc/Json_tutorial.cs index 2740ea0b..a6652fd8 100644 --- a/tests/Doc/Json_tutorial.cs +++ b/tests/Doc/Json_tutorial.cs @@ -30,7 +30,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/ListTutorial.cs b/tests/Doc/ListTutorial.cs index 3ee18e2c..8d659153 100644 --- a/tests/Doc/ListTutorial.cs +++ b/tests/Doc/ListTutorial.cs @@ -27,7 +27,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/QueryAggExample.cs b/tests/Doc/QueryAggExample.cs index 4ec65d4a..dacf3afa 100644 --- a/tests/Doc/QueryAggExample.cs +++ b/tests/Doc/QueryAggExample.cs @@ -32,7 +32,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/QueryEmExample.cs b/tests/Doc/QueryEmExample.cs index 52eb9e53..2051907b 100644 --- a/tests/Doc/QueryEmExample.cs +++ b/tests/Doc/QueryEmExample.cs @@ -31,7 +31,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/QueryFtExample.cs b/tests/Doc/QueryFtExample.cs index e9f709c2..f16dfc9d 100644 --- a/tests/Doc/QueryFtExample.cs +++ b/tests/Doc/QueryFtExample.cs @@ -31,7 +31,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/QueryRangeExample.cs b/tests/Doc/QueryRangeExample.cs index 931bf3f9..e35488f0 100644 --- a/tests/Doc/QueryRangeExample.cs +++ b/tests/Doc/QueryRangeExample.cs @@ -31,7 +31,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/SearchQuickstartExample.cs b/tests/Doc/SearchQuickstartExample.cs index 3827e647..9c1b9f40 100644 --- a/tests/Doc/SearchQuickstartExample.cs +++ b/tests/Doc/SearchQuickstartExample.cs @@ -27,7 +27,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END // STEP_START connect var muxer = ConnectionMultiplexer.Connect("localhost:6379"); diff --git a/tests/Doc/SetGetExample.cs b/tests/Doc/SetGetExample.cs index 1c61c505..deaee91e 100644 --- a/tests/Doc/SetGetExample.cs +++ b/tests/Doc/SetGetExample.cs @@ -24,7 +24,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/SetsTutorial.cs b/tests/Doc/SetsTutorial.cs index ba55c646..cc28d99b 100644 --- a/tests/Doc/SetsTutorial.cs +++ b/tests/Doc/SetsTutorial.cs @@ -29,7 +29,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/SortedSetExample.cs b/tests/Doc/SortedSetExample.cs index 517ec555..542cdd39 100644 --- a/tests/Doc/SortedSetExample.cs +++ b/tests/Doc/SortedSetExample.cs @@ -25,7 +25,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/StreamTutorial.cs b/tests/Doc/StreamTutorial.cs index 28eb6a8b..c1568004 100644 --- a/tests/Doc/StreamTutorial.cs +++ b/tests/Doc/StreamTutorial.cs @@ -29,7 +29,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/StringSnippets.cs b/tests/Doc/StringSnippets.cs index c32c4fee..0a85d5ec 100644 --- a/tests/Doc/StringSnippets.cs +++ b/tests/Doc/StringSnippets.cs @@ -25,7 +25,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/Tdigest_tutorial.cs b/tests/Doc/Tdigest_tutorial.cs index 608f6f05..d0b03401 100644 --- a/tests/Doc/Tdigest_tutorial.cs +++ b/tests/Doc/Tdigest_tutorial.cs @@ -29,7 +29,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); diff --git a/tests/Doc/Topk_tutorial.cs b/tests/Doc/Topk_tutorial.cs index 0e53a8b8..a04965de 100644 --- a/tests/Doc/Topk_tutorial.cs +++ b/tests/Doc/Topk_tutorial.cs @@ -29,7 +29,7 @@ public void run() //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone); - var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone); + var _ = GetCleanDatabase(EndpointsFixture.Env.Standalone); //REMOVE_END var muxer = ConnectionMultiplexer.Connect("localhost:6379"); var db = muxer.GetDatabase(); From 9286b6387d88d294fff7cf66be2101a4ab0dcac3 Mon Sep 17 00:00:00 2001 From: atakavci Date: Tue, 11 Feb 2025 18:17:46 +0300 Subject: [PATCH 6/7] theory parameter dropeed + format fix --- tests/Doc/Bitmap_tutorial.cs | 1 - tests/Doc/CmdsGenericExample.cs | 7 ++----- tests/Doc/CmdsHashExample.cs | 1 - tests/Doc/CmdsSortedSetExamples.cs | 1 - tests/Doc/CmdsStringExample.cs | 1 - tests/Doc/Cms_tutorial.cs | 1 - tests/Doc/Cuckoo_tutorial.cs | 1 - tests/Doc/Geo_tutorial.cs | 1 - tests/Doc/HashExample.cs | 1 - tests/Doc/Hll_tutorial.cs | 1 - tests/Doc/HomeJsonExample.cs | 1 - tests/Doc/Json_tutorial.cs | 1 - tests/Doc/ListTutorial.cs | 1 - tests/Doc/QueryAggExample.cs | 1 - tests/Doc/QueryEmExample.cs | 1 - tests/Doc/QueryFtExample.cs | 1 - tests/Doc/QueryRangeExample.cs | 1 - tests/Doc/SearchQuickstartExample.cs | 1 - tests/Doc/SetGetExample.cs | 1 - tests/Doc/SetsTutorial.cs | 1 - tests/Doc/SortedSetExample.cs | 1 - tests/Doc/StreamTutorial.cs | 1 - tests/Doc/StringSnippets.cs | 1 - tests/Doc/Tdigest_tutorial.cs | 1 - tests/Doc/Topk_tutorial.cs | 1 - 25 files changed, 2 insertions(+), 29 deletions(-) diff --git a/tests/Doc/Bitmap_tutorial.cs b/tests/Doc/Bitmap_tutorial.cs index 4659fe8f..be521a9f 100644 --- a/tests/Doc/Bitmap_tutorial.cs +++ b/tests/Doc/Bitmap_tutorial.cs @@ -18,7 +18,6 @@ public class Bitmap_tutorial // REMOVE_END { // REMOVE_START - public Bitmap_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/CmdsGenericExample.cs b/tests/Doc/CmdsGenericExample.cs index e175a83a..3080ff43 100644 --- a/tests/Doc/CmdsGenericExample.cs +++ b/tests/Doc/CmdsGenericExample.cs @@ -18,15 +18,12 @@ public class CmdsGenericExample // REMOVE_END { // REMOVE_START - public CmdsGenericExample(EndpointsFixture fixture) : base(fixture) { } - [SkipIfRedis(Comparison.LessThan, "7.0.0")] - [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] - + [InlineData] // No parameters passed, but still uses Theory // REMOVE_END - public void run(string endpoint = "standalone") + public void run() { //REMOVE_START // This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection diff --git a/tests/Doc/CmdsHashExample.cs b/tests/Doc/CmdsHashExample.cs index 09fafdfc..09eaf3ee 100644 --- a/tests/Doc/CmdsHashExample.cs +++ b/tests/Doc/CmdsHashExample.cs @@ -16,7 +16,6 @@ public class CmdsHashExample // REMOVE_END { // REMOVE_START - public CmdsHashExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/CmdsSortedSetExamples.cs b/tests/Doc/CmdsSortedSetExamples.cs index f4e8009b..997f222c 100644 --- a/tests/Doc/CmdsSortedSetExamples.cs +++ b/tests/Doc/CmdsSortedSetExamples.cs @@ -18,7 +18,6 @@ public class CmdsSortedSet // REMOVE_END { // REMOVE_START - public CmdsSortedSet(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/CmdsStringExample.cs b/tests/Doc/CmdsStringExample.cs index fc1c4fa4..1d888f4d 100644 --- a/tests/Doc/CmdsStringExample.cs +++ b/tests/Doc/CmdsStringExample.cs @@ -18,7 +18,6 @@ public class CmdsStringExample // REMOVE_END { // REMOVE_START - public CmdsStringExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/Cms_tutorial.cs b/tests/Doc/Cms_tutorial.cs index a48927d1..4d194fcc 100644 --- a/tests/Doc/Cms_tutorial.cs +++ b/tests/Doc/Cms_tutorial.cs @@ -20,7 +20,6 @@ public class Cms_tutorial // REMOVE_END { // REMOVE_START - public Cms_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/Cuckoo_tutorial.cs b/tests/Doc/Cuckoo_tutorial.cs index 2613b627..e6f6a67f 100644 --- a/tests/Doc/Cuckoo_tutorial.cs +++ b/tests/Doc/Cuckoo_tutorial.cs @@ -19,7 +19,6 @@ public class Cuckoo_tutorial // REMOVE_END { // REMOVE_START - public Cuckoo_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/Geo_tutorial.cs b/tests/Doc/Geo_tutorial.cs index a66a64df..9f7ac6d5 100644 --- a/tests/Doc/Geo_tutorial.cs +++ b/tests/Doc/Geo_tutorial.cs @@ -18,7 +18,6 @@ public class Geo_tutorial // REMOVE_END { // REMOVE_START - public Geo_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/HashExample.cs b/tests/Doc/HashExample.cs index cdf3f5de..991fbbef 100644 --- a/tests/Doc/HashExample.cs +++ b/tests/Doc/HashExample.cs @@ -14,7 +14,6 @@ public class HashExample // REMOVE_END { // REMOVE_START - public HashExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/Hll_tutorial.cs b/tests/Doc/Hll_tutorial.cs index f930bcce..27aa8bcd 100644 --- a/tests/Doc/Hll_tutorial.cs +++ b/tests/Doc/Hll_tutorial.cs @@ -18,7 +18,6 @@ public class Hll_tutorial // REMOVE_END { // REMOVE_START - public Hll_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/HomeJsonExample.cs b/tests/Doc/HomeJsonExample.cs index 760fadf3..60d17c5e 100644 --- a/tests/Doc/HomeJsonExample.cs +++ b/tests/Doc/HomeJsonExample.cs @@ -22,7 +22,6 @@ public class HomeJsonExample // REMOVE_END { // REMOVE_START - public HomeJsonExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/Json_tutorial.cs b/tests/Doc/Json_tutorial.cs index a6652fd8..c9430e1a 100644 --- a/tests/Doc/Json_tutorial.cs +++ b/tests/Doc/Json_tutorial.cs @@ -20,7 +20,6 @@ public class Json_tutorial // REMOVE_END { // REMOVE_START - public Json_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/ListTutorial.cs b/tests/Doc/ListTutorial.cs index 8d659153..8bbb2bc9 100644 --- a/tests/Doc/ListTutorial.cs +++ b/tests/Doc/ListTutorial.cs @@ -17,7 +17,6 @@ public class ListExample // REMOVE_END { // REMOVE_START - public ListExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/QueryAggExample.cs b/tests/Doc/QueryAggExample.cs index dacf3afa..b86c4654 100644 --- a/tests/Doc/QueryAggExample.cs +++ b/tests/Doc/QueryAggExample.cs @@ -22,7 +22,6 @@ public class QueryAggExample // REMOVE_END { // REMOVE_START - public QueryAggExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/QueryEmExample.cs b/tests/Doc/QueryEmExample.cs index 2051907b..608868e0 100644 --- a/tests/Doc/QueryEmExample.cs +++ b/tests/Doc/QueryEmExample.cs @@ -21,7 +21,6 @@ public class QueryEmExample // REMOVE_END { // REMOVE_START - public QueryEmExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/QueryFtExample.cs b/tests/Doc/QueryFtExample.cs index f16dfc9d..687f01be 100644 --- a/tests/Doc/QueryFtExample.cs +++ b/tests/Doc/QueryFtExample.cs @@ -21,7 +21,6 @@ public class QueryFtExample // REMOVE_END { // REMOVE_START - public QueryFtExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/QueryRangeExample.cs b/tests/Doc/QueryRangeExample.cs index e35488f0..30a758a9 100644 --- a/tests/Doc/QueryRangeExample.cs +++ b/tests/Doc/QueryRangeExample.cs @@ -21,7 +21,6 @@ public class QueryRangeExample // REMOVE_END { // REMOVE_START - public QueryRangeExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/SearchQuickstartExample.cs b/tests/Doc/SearchQuickstartExample.cs index 9c1b9f40..df9fa2e8 100644 --- a/tests/Doc/SearchQuickstartExample.cs +++ b/tests/Doc/SearchQuickstartExample.cs @@ -17,7 +17,6 @@ public class SearchQuickstartExample // REMOVE_END { // REMOVE_START - public SearchQuickstartExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/SetGetExample.cs b/tests/Doc/SetGetExample.cs index deaee91e..fc2dd70d 100644 --- a/tests/Doc/SetGetExample.cs +++ b/tests/Doc/SetGetExample.cs @@ -14,7 +14,6 @@ public class SetGetExample // REMOVE_END { // REMOVE_START - public SetGetExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/SetsTutorial.cs b/tests/Doc/SetsTutorial.cs index cc28d99b..1d2be52d 100644 --- a/tests/Doc/SetsTutorial.cs +++ b/tests/Doc/SetsTutorial.cs @@ -19,7 +19,6 @@ public class SetsExample // REMOVE_END { // REMOVE_START - public SetsExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/SortedSetExample.cs b/tests/Doc/SortedSetExample.cs index 542cdd39..320de270 100644 --- a/tests/Doc/SortedSetExample.cs +++ b/tests/Doc/SortedSetExample.cs @@ -15,7 +15,6 @@ public class SortedSetExample // REMOVE_END { // REMOVE_START - public SortedSetExample(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/StreamTutorial.cs b/tests/Doc/StreamTutorial.cs index c1568004..46a635c8 100644 --- a/tests/Doc/StreamTutorial.cs +++ b/tests/Doc/StreamTutorial.cs @@ -19,7 +19,6 @@ public class StreamTutorial // REMOVE_END { // REMOVE_START - public StreamTutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/StringSnippets.cs b/tests/Doc/StringSnippets.cs index 0a85d5ec..be76d7f3 100644 --- a/tests/Doc/StringSnippets.cs +++ b/tests/Doc/StringSnippets.cs @@ -15,7 +15,6 @@ public class StringSnippets // REMOVE_END { // REMOVE_START - public StringSnippets(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/Tdigest_tutorial.cs b/tests/Doc/Tdigest_tutorial.cs index d0b03401..216c82a0 100644 --- a/tests/Doc/Tdigest_tutorial.cs +++ b/tests/Doc/Tdigest_tutorial.cs @@ -19,7 +19,6 @@ public class Tdigest_tutorial // REMOVE_END { // REMOVE_START - public Tdigest_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] diff --git a/tests/Doc/Topk_tutorial.cs b/tests/Doc/Topk_tutorial.cs index a04965de..8f7304f9 100644 --- a/tests/Doc/Topk_tutorial.cs +++ b/tests/Doc/Topk_tutorial.cs @@ -19,7 +19,6 @@ public class Topk_tutorial // REMOVE_END { // REMOVE_START - public Topk_tutorial(EndpointsFixture fixture) : base(fixture) { } [SkippableFact] From 800116f0674fea3814908ce3332c7328807b1007 Mon Sep 17 00:00:00 2001 From: atakavci Date: Tue, 11 Feb 2025 18:45:40 +0300 Subject: [PATCH 7/7] fix issue in StreamTutorial --- tests/Doc/StreamTutorial.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Doc/StreamTutorial.cs b/tests/Doc/StreamTutorial.cs index 46a635c8..73703d15 100644 --- a/tests/Doc/StreamTutorial.cs +++ b/tests/Doc/StreamTutorial.cs @@ -201,7 +201,7 @@ public void run() // STEP_START xadd_7 RedisValue res11 = ""; - Version version = GetConnection("localhost:6379").GetServers()[0].Version; + Version version = muxer.GetServer("localhost:6379").Version; if (version.Major >= 7) { res11 = db.StreamAdd(