public AppsIndexTests() { A.CallTo(() => grainFactory.GetGrain <IAppsByNameIndexGrain>(SingleGrain.Id, null)) .Returns(indexByName); A.CallTo(() => grainFactory.GetGrain <IAppsByUserIndexGrain>(userId, null)) .Returns(indexByUser); sut = new AppsIndex(grainFactory); }
public AppsIndexTests() { A.CallTo(() => grainFactory.GetGrain <IAppsByNameIndexGrain>(SingleGrain.Id, null)) .Returns(indexByName); A.CallTo(() => grainFactory.GetGrain <IAppsByUserIndexGrain>(userId, null)) .Returns(indexByUser); var cache = new ReplicatedCache(new MemoryCache(Options.Create(new MemoryCacheOptions())), new SimplePubSub()); sut = new AppsIndex(grainFactory, cache); }
public AppsIndexTests() { A.CallTo(() => grainFactory.GetGrain <IAppsCacheGrain>(SingleGrain.Id, null)) .Returns(cache); var replicatedCache = new ReplicatedCache(new MemoryCache(Options.Create(new MemoryCacheOptions())), new SimplePubSub(A.Fake <ILogger <SimplePubSub> >()), Options.Create(new ReplicatedCacheOptions { Enable = true })); sut = new AppsIndex(appRepository, grainFactory, replicatedCache); }
public AppsIndexTests() { A.CallTo(() => grainFactory.GetGrain <IAppsByNameIndexGrain>(SingleGrain.Id, null)) .Returns(indexByName); A.CallTo(() => grainFactory.GetGrain <IAppsByUserIndexGrain>(userId, null)) .Returns(indexForUser); A.CallTo(() => grainFactory.GetGrain <IAppsByUserIndexGrain>(clientId, null)) .Returns(indexForClient); var cache = new ReplicatedCache(new MemoryCache(Options.Create(new MemoryCacheOptions())), new SimplePubSub(A.Fake <ILogger <SimplePubSub> >()), Options.Create(new ReplicatedCacheOptions { Enable = true })); sut = new AppsIndex(grainFactory, cache); }