Skip to content

Commit 978ba01

Browse files
authored
fix: fixed the warning xUnit1013 (#457) (#458)
1 parent 5cf3e25 commit 978ba01

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

test/EasyCaching.UnitTests/CachingTests/BaseCachingProviderTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public async Task Refresh_Async_Should_Throw_ArgumentOutOfRangeException_When_Ex
246246
[InlineData("")]
247247
[InlineData(" ")]
248248
[InlineData(null)]
249-
public virtual void RemoveByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(string prefix)
249+
protected virtual void RemoveByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(string prefix)
250250
{
251251
Assert.Throws<ArgumentNullException>(() => _provider.RemoveByPrefix(prefix));
252252
}
@@ -255,7 +255,7 @@ public virtual void RemoveByPrefix_Should_Throw_ArgumentNullException_When_Cache
255255
[InlineData("")]
256256
[InlineData(" ")]
257257
[InlineData(null)]
258-
public async virtual Task RemoveByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(string preifx)
258+
protected async virtual Task RemoveByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(string preifx)
259259
{
260260
await Assert.ThrowsAsync<ArgumentNullException>(async () => await _provider.RemoveByPrefixAsync(preifx));
261261
}
@@ -264,7 +264,7 @@ public async virtual Task RemoveByPrefix_Async_Should_Throw_ArgumentNullExceptio
264264
[InlineData("")]
265265
[InlineData(" ")]
266266
[InlineData(null)]
267-
public virtual void GetAllByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(string prefix)
267+
protected virtual void GetAllByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(string prefix)
268268
{
269269
Assert.Throws<ArgumentNullException>(() => _provider.RemoveByPrefix(prefix));
270270
}
@@ -273,7 +273,7 @@ public virtual void GetAllByPrefix_Should_Throw_ArgumentNullException_When_Cache
273273
[InlineData("")]
274274
[InlineData(" ")]
275275
[InlineData(null)]
276-
public virtual async Task GetAllByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(string preifx)
276+
protected virtual async Task GetAllByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(string preifx)
277277
{
278278
await Assert.ThrowsAsync<ArgumentNullException>(async () => await _provider.RemoveByPrefixAsync(preifx));
279279
}
@@ -874,7 +874,7 @@ protected virtual async Task RemoveByPrefixAsync_Should_Succeed()
874874
#region RemoveByPattern/RemoveByPatternAsync
875875

876876
[Fact]
877-
public virtual void RemoveByPattern_Should_Succeed()
877+
protected virtual void RemoveByPattern_Should_Succeed()
878878
{
879879
SetCacheItem("garden:pots:flowers", "ok");
880880
SetCacheItem("garden:pots:flowers:test", "ok");
@@ -935,7 +935,7 @@ public virtual void RemoveByPattern_Should_Succeed()
935935
}
936936

937937
[Fact]
938-
public virtual async Task RemoveByPatternAsync_Should_Succeed()
938+
protected virtual async Task RemoveByPatternAsync_Should_Succeed()
939939
{
940940
SetCacheItem("garden:pots:flowers", "ok");
941941
SetCacheItem("garden:pots:flowers:test", "ok");

test/EasyCaching.UnitTests/CachingTests/FasterKvCachingProviderTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ protected override void Get_Parallel_Should_Succeed()
7676
{
7777
}
7878

79-
public override Task GetAllByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
79+
protected override Task GetAllByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
8080
string preifx)
8181
{
8282
return Task.CompletedTask;
8383
}
8484

85-
public override void GetAllByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
85+
protected override void GetAllByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
8686
string prefix)
8787
{
8888
}
@@ -132,16 +132,16 @@ protected override void GetExpiration_Should_Succeed()
132132
{
133133
}
134134

135-
public override void RemoveByPattern_Should_Succeed()
135+
protected override void RemoveByPattern_Should_Succeed()
136136
{
137137
}
138138

139-
public override Task RemoveByPatternAsync_Should_Succeed()
139+
protected override Task RemoveByPatternAsync_Should_Succeed()
140140
{
141141
return Task.CompletedTask;
142142
}
143143

144-
public override Task RemoveByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
144+
protected override Task RemoveByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
145145
string preifx)
146146

147147
{
@@ -152,7 +152,7 @@ protected override void RemoveByPrefix_Should_Succeed()
152152
{
153153
}
154154

155-
public override void RemoveByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
155+
protected override void RemoveByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
156156
string prefix)
157157
{
158158
}

test/EasyCaching.UnitTests/CachingTests/MemcachedProviderTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ protected override void GetByPrefix_Should_Succeed()
116116
}
117117

118118
[Fact]
119-
public override void RemoveByPattern_Should_Succeed()
119+
protected override void RemoveByPattern_Should_Succeed()
120120
{
121121
}
122122

123123
[Fact]
124-
public override async Task RemoveByPatternAsync_Should_Succeed()
124+
protected override async Task RemoveByPatternAsync_Should_Succeed()
125125
{
126126
await Task.FromResult(1);
127127
}

test/EasyCaching.UnitTests/SerializerTests/BaseSerializerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void SerializeObject_should_Succeed()
3939
}
4040

4141
[Fact]
42-
public virtual void DeserializeObject_should_Succeed()
42+
protected virtual void DeserializeObject_should_Succeed()
4343
{
4444
object obj = new Model { Prop = "abc" };
4545

test/EasyCaching.UnitTests/SerializerTests/MemoryPackSerializerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public MemoryPackSerializerTest()
1414
}
1515

1616
//This should be overrided becuse it is not supported by memory-pack
17-
public override void DeserializeObject_should_Succeed()
17+
protected override void DeserializeObject_should_Succeed()
1818
{
1919
Person input = new("test", "test1");
2020
var serialized = _serializer.Serialize<Person>(input);

0 commit comments

Comments
 (0)