Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,555 changes: 0 additions & 1,555 deletions test/EasyCaching.UnitTests/CachingTests/BaseCachingProviderTest.cs

This file was deleted.

1,920 changes: 0 additions & 1,920 deletions test/EasyCaching.UnitTests/CachingTests/BaseRedisFeatureCachingProviderTest.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ protected override void Get_Parallel_Should_Succeed()
{
}

protected override Task GetAllByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
public override Task GetAllByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
string preifx)
{
return Task.CompletedTask;
}

protected override void GetAllByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
public override void GetAllByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
string prefix)
{
}
Expand Down Expand Up @@ -132,16 +132,16 @@ protected override void GetExpiration_Should_Succeed()
{
}

protected override void RemoveByPattern_Should_Succeed()
public override void RemoveByPattern_Should_Succeed()
{
}

protected override Task RemoveByPatternAsync_Should_Succeed()
public override Task RemoveByPatternAsync_Should_Succeed()
{
return Task.CompletedTask;
}

protected override Task RemoveByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
public override Task RemoveByPrefix_Async_Should_Throw_ArgumentNullException_When_Prefix_IsNullOrWhiteSpace(
string preifx)

{
Expand All @@ -152,7 +152,7 @@ protected override void RemoveByPrefix_Should_Succeed()
{
}

protected override void RemoveByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
public override void RemoveByPrefix_Should_Throw_ArgumentNullException_When_CacheKey_IsNullOrWhiteSpace(
string prefix)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ protected override void GetByPrefix_Should_Succeed()
}

[Fact]
protected override void RemoveByPattern_Should_Succeed()
public override void RemoveByPattern_Should_Succeed()
{
}

[Fact]
protected override async Task RemoveByPatternAsync_Should_Succeed()
public override async Task RemoveByPatternAsync_Should_Succeed()
{
await Task.FromResult(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace EasyCaching.UnitTests.DistributedLock
{
public class CSRedisLockTest : DistributedLockTest
public class CSRedisLockTest : BaseDistributedLockTest
{
private static readonly IDistributedLockFactory Factory = new ServiceCollection()
.AddLogging()
Expand Down
191 changes: 0 additions & 191 deletions test/EasyCaching.UnitTests/DistributedLock/DistributedLockTest.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace EasyCaching.UnitTests.DistributedLock
{
public class MemcachedLockTest : DistributedLockTest
public class MemcachedLockTest : BaseDistributedLockTest
{
private static readonly IDistributedLockFactory Factory = new ServiceCollection()
.AddLogging()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace EasyCaching.UnitTests.DistributedLock
{
public class MemoryLockTest : DistributedLockTest
public class MemoryLockTest : BaseDistributedLockTest
{
public static IDistributedLockFactory Factory = new MemoryLockFactory();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace EasyCaching.UnitTests.DistributedLock
{
public class RedisLockTest : DistributedLockTest
public class RedisLockTest : BaseDistributedLockTest
{
private static readonly IDistributedLockFactory Factory = new ServiceCollection()
.AddLogging()
Expand Down
9 changes: 5 additions & 4 deletions test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="EasyCaching.BaseTest" Version="1.9.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FakeItEasy" Version="6.0.0" />
<PackageReference Include="FakeItEasy" Version="7.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
19 changes: 10 additions & 9 deletions test/EasyCaching.UnitTests/Infrastructure/IExampleService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace EasyCaching.UnitTests.Infrastructure
{
using EasyCaching.BaseTest.Infrastructure;
using EasyCaching.Core.Interceptor;
using EasyCaching.UnitTests.CustomInterceptors;
using System;
Expand Down Expand Up @@ -143,13 +144,13 @@ public interface IAspectCoreExampleService //: IEasyCaching
Task<string> PutTestAsync(int num, string str = "123");

[EasyCachingAble(Expiration = 1)]
Task<IEnumerable<Model>> AbleIEnumerableTest();
Task<IEnumerable<SerializerTestModel>> AbleIEnumerableTest();

[EasyCachingAble(Expiration = 1)]
Task<IList<Model>> AbleIListTest();
Task<IList<SerializerTestModel>> AbleIListTest();

[EasyCachingAble(Expiration = 1)]
Task<List<Model>> AbleListTest();
Task<List<SerializerTestModel>> AbleListTest();

[EasyCachingAble(Expiration = 1)]
Task<string> AbleTestWithNullValueAsync();
Expand Down Expand Up @@ -210,21 +211,21 @@ public async Task<string> PutTestAsync(int num, string str)
return await Task.FromResult($"PutTestAsync-{num}");
}

public Task<IEnumerable<Model>> AbleIEnumerableTest()
public Task<IEnumerable<SerializerTestModel>> AbleIEnumerableTest()
{
IEnumerable<Model> list = new List<Model> { new Model { Prop = "prop" } };
IEnumerable<SerializerTestModel> list = new List<SerializerTestModel> { new SerializerTestModel { Prop = "prop" } };
return Task.FromResult(list);
}

public Task<IList<Model>> AbleIListTest()
public Task<IList<SerializerTestModel>> AbleIListTest()
{
IList<Model> list = new List<Model> { new Model { Prop = "prop" } };
IList<SerializerTestModel> list = new List<SerializerTestModel> { new SerializerTestModel { Prop = "prop" } };
return Task.FromResult(list);
}

public Task<List<Model>> AbleListTest()
public Task<List<SerializerTestModel>> AbleListTest()
{
var list = new List<Model> { new Model { Prop = "prop" } };
var list = new List<SerializerTestModel> { new SerializerTestModel { Prop = "prop" } };
return Task.FromResult(list);
}

Expand Down
12 changes: 0 additions & 12 deletions test/EasyCaching.UnitTests/Infrastructure/Product.cs

This file was deleted.

Loading