-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extensions package for a named client
- Loading branch information
1 parent
b144843
commit 83439a3
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
Kentico.Kontent.Delivery.Caching.Tests/CacheManagerFactoryTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using FakeItEasy; | ||
using FluentAssertions; | ||
using Kentico.Kontent.Delivery.Caching.Factories; | ||
using Microsoft.Extensions.Caching.Distributed; | ||
using Microsoft.Extensions.Caching.Memory; | ||
using Microsoft.Extensions.Options; | ||
using Xunit; | ||
|
||
namespace Kentico.Kontent.Delivery.Caching.Tests | ||
{ | ||
public class CacheManagerFactoryTests | ||
{ | ||
private IOptions<DeliveryCacheOptions> _options; | ||
private IDistributedCache _distributedCache; | ||
private IMemoryCache _memoryCache; | ||
|
||
public CacheManagerFactoryTests() | ||
{ | ||
_options = A.Fake<IOptions<DeliveryCacheOptions>>(); | ||
_distributedCache = A.Fake<IDistributedCache>(); | ||
_memoryCache = A.Fake<IMemoryCache>(); | ||
} | ||
|
||
[Fact] | ||
public void Create_DistributedCache() | ||
{ | ||
var deliveryCacheManager = CacheManagerFactory.Create(_distributedCache, _options); | ||
|
||
deliveryCacheManager.Should().NotBeNull(); | ||
} | ||
|
||
[Fact] | ||
public void Create_MemoryCache() | ||
{ | ||
var deliveryCacheManager = CacheManagerFactory.Create(_memoryCache, _options); | ||
|
||
deliveryCacheManager.Should().NotBeNull(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters