Skip to content

Commit 1f6a38b

Browse files
committed
Use skippable theories
1 parent 7f646c0 commit 1f6a38b

File tree

10 files changed

+196
-196
lines changed

10 files changed

+196
-196
lines changed

tests/NRedisStack.Tests/Bloom/BloomTests.cs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public BloomTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
1212
{
1313
}
1414

15-
[Theory]
15+
[SkippableTheory]
1616
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
1717
public void TestReserveBasic(string endpointId)
1818
{
@@ -26,7 +26,7 @@ public void TestReserveBasic(string endpointId)
2626
Assert.False(bf.Exists(key, "item2"));
2727
}
2828

29-
[Theory]
29+
[SkippableTheory]
3030
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
3131
public async Task TestReserveBasicAsync(string endpointId)
3232
{
@@ -40,7 +40,7 @@ public async Task TestReserveBasicAsync(string endpointId)
4040
Assert.False(await bf.ExistsAsync(key, "item2"));
4141
}
4242

43-
[Theory]
43+
[SkippableTheory]
4444
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
4545
public void TestAddWhenExist(string endpointId)
4646
{
@@ -51,7 +51,7 @@ public void TestAddWhenExist(string endpointId)
5151
Assert.False(bf.Add(key, "item1")); // second time
5252
}
5353

54-
[Theory]
54+
[SkippableTheory]
5555
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
5656
public async Task TestAddWhenExistAsync(string endpointId)
5757
{
@@ -62,7 +62,7 @@ public async Task TestAddWhenExistAsync(string endpointId)
6262
Assert.False(await bf.AddAsync(key, "item1")); // second time
6363
}
6464

65-
[Theory]
65+
[SkippableTheory]
6666
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
6767
public void TestAddExists(string endpointId)
6868
{
@@ -73,7 +73,7 @@ public void TestAddExists(string endpointId)
7373
Assert.True(bf.Exists(key, "item1"));
7474
}
7575

76-
[Theory]
76+
[SkippableTheory]
7777
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
7878
public async Task TestAddExistsAsync(string endpointId)
7979
{
@@ -84,7 +84,7 @@ public async Task TestAddExistsAsync(string endpointId)
8484
Assert.True(await bf.ExistsAsync(key, "item1"));
8585
}
8686

87-
[Theory]
87+
[SkippableTheory]
8888
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
8989
public void TestAddExistsMulti(string endpointId)
9090
{
@@ -100,7 +100,7 @@ public void TestAddExistsMulti(string endpointId)
100100
Assert.Equal(new bool[] { true, false, false }, result);
101101
}
102102

103-
[Theory]
103+
[SkippableTheory]
104104
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
105105
public async Task TestAddExistsMultiAsync(string endpointId)
106106
{
@@ -116,7 +116,7 @@ public async Task TestAddExistsMultiAsync(string endpointId)
116116
Assert.Equal(new bool[] { true, false, false }, result);
117117
}
118118

119-
[Theory]
119+
[SkippableTheory]
120120
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
121121
public void TestExample(string endpointId)
122122
{
@@ -145,7 +145,7 @@ public void TestExample(string endpointId)
145145
bf.Add("specialBloom", "foo");
146146
}
147147

148-
[Theory]
148+
[SkippableTheory]
149149
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
150150
public async Task TestExampleAsync(string endpointId)
151151
{
@@ -174,7 +174,7 @@ public async Task TestExampleAsync(string endpointId)
174174
await bf.AddAsync("specialBloom", "foo");
175175
}
176176

177-
[Theory]
177+
[SkippableTheory]
178178
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
179179
public void TestInsert(string endpointId)
180180
{
@@ -190,7 +190,7 @@ public void TestInsert(string endpointId)
190190
Assert.True(bf.Exists("key", "item3"));
191191
}
192192

193-
[Theory]
193+
[SkippableTheory]
194194
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
195195
public async Task TestInsertAsync(string endpointId)
196196
{
@@ -206,7 +206,7 @@ public async Task TestInsertAsync(string endpointId)
206206
Assert.True(await bf.ExistsAsync("key", "item3"));
207207
}
208208

209-
[Theory]
209+
[SkippableTheory]
210210
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
211211
public void TestExistsNonExist(string endpointId)
212212
{
@@ -217,7 +217,7 @@ public void TestExistsNonExist(string endpointId)
217217
Assert.False(bf.Exists("NonExistKey", item));
218218
}
219219

220-
[Theory]
220+
[SkippableTheory]
221221
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
222222
public async Task TestExistsNonExistAsync(string endpointId)
223223
{
@@ -228,7 +228,7 @@ public async Task TestExistsNonExistAsync(string endpointId)
228228
Assert.False(await bf.ExistsAsync("NonExistKey", item));
229229
}
230230

231-
[Theory]
231+
[SkippableTheory]
232232
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
233233
public void TestInfo(string endpointId)
234234
{
@@ -244,7 +244,7 @@ public void TestInfo(string endpointId)
244244
Assert.Throws<RedisServerException>(() => bf.Info("notExistKey"));
245245
}
246246

247-
[Theory]
247+
[SkippableTheory]
248248
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
249249
public async Task TestInfoAsync(string endpointId)
250250
{
@@ -260,7 +260,7 @@ public async Task TestInfoAsync(string endpointId)
260260
await Assert.ThrowsAsync<RedisServerException>(() => bf.InfoAsync("notExistKey"));
261261
}
262262

263-
[Theory]
263+
[SkippableTheory]
264264
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
265265
public void TestScanDumpAndLoadChunk(string endpointId)
266266
{
@@ -285,7 +285,7 @@ public void TestScanDumpAndLoadChunk(string endpointId)
285285
Assert.True(bf.Exists("bloom-load", "a"));
286286
}
287287

288-
[Theory]
288+
[SkippableTheory]
289289
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
290290
public async Task TestScanDumpAndLoadChunkAsync(string endpointId)
291291
{
@@ -310,7 +310,7 @@ public async Task TestScanDumpAndLoadChunkAsync(string endpointId)
310310
Assert.True(await bf.ExistsAsync("bloom-load", "a"));
311311
}
312312

313-
[Theory]
313+
[SkippableTheory]
314314
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
315315
public void TestModulePrefixs(string endpointId)
316316
{
@@ -324,7 +324,7 @@ public void TestModulePrefixs(string endpointId)
324324
Assert.NotEqual(bf1.GetHashCode(), bf2.GetHashCode());
325325
}
326326

327-
[Theory]
327+
[SkippableTheory]
328328
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
329329
public void TestCard(string endpointId)
330330
{
@@ -343,7 +343,7 @@ public void TestCard(string endpointId)
343343
Assert.Throws<RedisServerException>(() => bf.Card("setKey"));
344344
}
345345

346-
[Theory]
346+
[SkippableTheory]
347347
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
348348
public async Task TestCardAsync(string endpointId)
349349
{
@@ -362,7 +362,7 @@ public async Task TestCardAsync(string endpointId)
362362
await Assert.ThrowsAsync<RedisServerException>(() => bf.CardAsync("setKey"));
363363
}
364364

365-
[Theory]
365+
[SkippableTheory]
366366
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
367367
public void TestInsertArgsError(string endpointId)
368368
{

tests/NRedisStack.Tests/CountMinSketch/CmsTests.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public CmsTests(EndpointsFixture endpointsFixture) : base(endpointsFixture)
1313
}
1414

1515

16-
[Theory]
16+
[SkippableTheory]
1717
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
1818
public void TestInitByDim(string endpointId)
1919
{
@@ -28,7 +28,7 @@ public void TestInitByDim(string endpointId)
2828
Assert.Equal(0, info.Count);
2929
}
3030

31-
[Theory]
31+
[SkippableTheory]
3232
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
3333
public async Task TestInitByDimAsync(string endpointId)
3434
{
@@ -43,7 +43,7 @@ public async Task TestInitByDimAsync(string endpointId)
4343
Assert.Equal(0, info.Count);
4444
}
4545

46-
[Theory]
46+
[SkippableTheory]
4747
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
4848
public void TestInitByProb(string endpointId)
4949
{
@@ -58,7 +58,7 @@ public void TestInitByProb(string endpointId)
5858
Assert.Equal(0, info.Count);
5959
}
6060

61-
[Theory]
61+
[SkippableTheory]
6262
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
6363
public async Task TestInitByProbAsync(string endpointId)
6464
{
@@ -73,7 +73,7 @@ public async Task TestInitByProbAsync(string endpointId)
7373
Assert.Equal(0, info.Count);
7474
}
7575

76-
[Theory]
76+
[SkippableTheory]
7777
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
7878
public void TestKeyAlreadyExists(string endpointId)
7979
{
@@ -84,7 +84,7 @@ public void TestKeyAlreadyExists(string endpointId)
8484
Assert.Throws<RedisServerException>(() => cms.InitByDim("dup", 8, 6));
8585
}
8686

87-
[Theory]
87+
[SkippableTheory]
8888
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
8989
public async Task TestKeyAlreadyExistsAsync(string endpointId)
9090
{
@@ -95,7 +95,7 @@ public async Task TestKeyAlreadyExistsAsync(string endpointId)
9595
await Assert.ThrowsAsync<RedisServerException>(() => cms.InitByDimAsync("dup", 8, 6));
9696
}
9797

98-
[Theory]
98+
[SkippableTheory]
9999
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
100100
public void TestIncrBy(string endpointId)
101101
{
@@ -113,7 +113,7 @@ public void TestIncrBy(string endpointId)
113113

114114
}
115115

116-
[Theory]
116+
[SkippableTheory]
117117
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
118118
public async Task TestIncrByAsync(string endpointId)
119119
{
@@ -131,7 +131,7 @@ public async Task TestIncrByAsync(string endpointId)
131131

132132
}
133133

134-
[Theory]
134+
[SkippableTheory]
135135
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
136136
public void TestIncrByMultipleArgs(string endpointId)
137137
{
@@ -154,7 +154,7 @@ public void TestIncrByMultipleArgs(string endpointId)
154154
Assert.Equal(25, info.Count);
155155
}
156156

157-
[Theory]
157+
[SkippableTheory]
158158
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
159159
public async Task TestIncrByMultipleArgsAsync(string endpointId)
160160
{
@@ -178,7 +178,7 @@ public async Task TestIncrByMultipleArgsAsync(string endpointId)
178178
}
179179

180180

181-
[Theory]
181+
[SkippableTheory]
182182
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
183183
public void TestQuery(string endpointId)
184184
{
@@ -196,7 +196,7 @@ public void TestQuery(string endpointId)
196196
Assert.Equal(new long[] { 10, 15 }, resp);
197197
}
198198

199-
[Theory]
199+
[SkippableTheory]
200200
[MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))]
201201
public async Task TestQueryAsync(string endpointId)
202202
{
@@ -312,7 +312,7 @@ public async Task TestMergeAsync(string endpointId)
312312
}
313313

314314

315-
[Theory]
315+
[SkippableTheory]
316316
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
317317
public void TestModulePrefixs(string endpointId)
318318
{

0 commit comments

Comments
 (0)