@@ -465,6 +465,24 @@ public void Configuration_CacheHandle_KnownType_MemcachedB()
465465 config . CacheHandleConfigurations [ 0 ] . Name . Should ( ) . Be ( "name" ) ;
466466 config . CacheHandleConfigurations [ 0 ] . Key . Should ( ) . Be ( "name" ) ; // now key gets set to name
467467 }
468+
469+ [ Fact ]
470+ public void Configuration_CacheHandle_Type_MemcachedB ( )
471+ {
472+ var data = new Dictionary < string , string >
473+ {
474+ { "cacheManagers:0:name" , "name" } ,
475+ { "cacheManagers:0:handles:0:type" , "CacheManager.Memcached.MemcachedCacheHandle`1, CacheManager.Memcached" } ,
476+ { "cacheManagers:0:handles:0:name" , "name" } ,
477+ } ;
478+
479+ var config = GetConfiguration ( data ) . GetCacheConfiguration ( "name" ) ;
480+ config . Name . Should ( ) . Be ( "name" ) ;
481+ config . CacheHandleConfigurations . Count . Should ( ) . Be ( 1 ) ;
482+ config . CacheHandleConfigurations [ 0 ] . HandleType . Should ( ) . Be ( typeof ( Memcached . MemcachedCacheHandle < > ) ) ;
483+ config . CacheHandleConfigurations [ 0 ] . Name . Should ( ) . Be ( "name" ) ;
484+ config . CacheHandleConfigurations [ 0 ] . Key . Should ( ) . Be ( "name" ) ; // now key gets set to name
485+ }
468486
469487 [ Fact ]
470488 public void Configuration_CacheHandle_KnownType_Web ( )
@@ -934,6 +952,20 @@ public void Configuration_Serializer_KnownType_Protobuf()
934952 config . SerializerType . Should ( ) . Be ( typeof ( Serialization . ProtoBuf . ProtoBufSerializer ) ) ;
935953 }
936954
955+ [ Fact ]
956+ public void Configuration_Serializer_Type_Protobuf ( )
957+ {
958+ var data = new Dictionary < string , string >
959+ {
960+ { "cacheManagers:0:name" , "name" } ,
961+ { "cacheManagers:0:handles:0:knownType" , "Dictionary" } ,
962+ { "cacheManagers:0:serializer:type" , "CacheManager.Serialization.ProtoBuf.ProtoBufSerializer, CacheManager.Serialization.ProtoBuf" }
963+ } ;
964+
965+ var config = GetConfiguration ( data ) . GetCacheConfiguration ( "name" ) ;
966+ config . SerializerType . Should ( ) . Be ( typeof ( Serialization . ProtoBuf . ProtoBufSerializer ) ) ;
967+ }
968+
937969 [ Fact ]
938970 public void Configuration_Redis_NothingDefined ( )
939971 {
0 commit comments