RegisterUnique

This commit is contained in:
Stephan
2018-11-29 10:35:16 +01:00
parent e9de6c1fc9
commit c6891c6c70
63 changed files with 520 additions and 602 deletions

View File

@@ -27,13 +27,13 @@ namespace Umbraco.Tests.Cache.DistributedCache
var composition = new Composition(register, new TypeLoader(), Mock.Of<IProfilingLogger>(), RuntimeLevel.Run);
register.Register<IServerRegistrar>(_ => new TestServerRegistrar());
register.RegisterSingleton<IServerMessenger>(_ => new TestServerMessenger());
composition.RegisterUnique<IServerRegistrar>(_ => new TestServerRegistrar());
composition.RegisterUnique<IServerMessenger>(_ => new TestServerMessenger());
composition.WithCollectionBuilder<CacheRefresherCollectionBuilder>()
.Add<TestCacheRefresher>();
Current.Factory = register.CreateFactory();
Current.Factory = composition.CreateFactory();
_distributedCache = new Umbraco.Web.Cache.DistributedCache();
}