File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 77using Enyim . Caching . Memcached ;
88using Xunit ;
99using Microsoft . Extensions . DependencyInjection ;
10+ using Microsoft . Extensions . Configuration ;
1011
1112namespace Enyim . Caching . Tests
1213{
@@ -17,6 +18,8 @@ public abstract class MemcachedClientTestsBase
1718 public MemcachedClientTestsBase ( )
1819 {
1920 IServiceCollection services = new ServiceCollection ( ) ;
21+ var configuration = new ConfigurationBuilder ( ) . Build ( ) ;
22+ services . AddSingleton < IConfiguration > ( configuration ) ;
2023 services . AddEnyimMemcached ( options => options . AddServer ( "memcached" , 11211 ) ) ;
2124 services . AddLogging ( ) ;
2225 IServiceProvider serviceProvider = services . BuildServiceProvider ( ) ;
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ public abstract class MemcachedClientTest
2121
2222 protected virtual MemcachedClient GetClient ( MemcachedProtocol protocol = MemcachedProtocol . Binary , bool useBinaryFormatterTranscoder = false )
2323 {
24- var configuration = new ConfigurationBuilder ( ) . Build ( ) ;
25-
2624 IServiceCollection services = new ServiceCollection ( ) ;
2725 services . AddEnyimMemcached ( options =>
2826 {
@@ -38,6 +36,7 @@ protected virtual MemcachedClient GetClient(MemcachedProtocol protocol = Memcach
3836 services . AddSingleton < ITranscoder , BinaryFormatterTranscoder > ( ) ;
3937 }
4038
39+ var configuration = new ConfigurationBuilder ( ) . Build ( ) ;
4140 services . AddSingleton < IConfiguration > ( configuration ) ;
4241 services . AddLogging ( builder => builder . SetMinimumLevel ( LogLevel . Error ) . AddConsole ( ) ) ;
4342
You can’t perform that action at this time.
0 commit comments