public async Task get_tries_cache_misses() { _snapshots = new Aggregates.Internal.StoreSnapshots(_store.Object, _cache.Object, (a, b, c, d, e) => "test"); _cache.Setup(x => x.Retreive("test")).Returns(Task.FromResult((ISnapshot)null)); var snapshot = await _snapshots.GetSnapshot <Entity>("test", "test", null).ConfigureAwait(false); Assert.Null(snapshot); }
public void Setup() { _snapshot = new Moq.Mock <IMemento>(); _store = new Moq.Mock <IStoreEvents>(); _cache = new Moq.Mock <ISnapshotReader>(); _fullevent = new Moq.Mock <IFullEvent>(); _fullevent.Setup(x => x.Descriptor).Returns(new EventDescriptor()); _snapshots = new Aggregates.Internal.StoreSnapshots(_store.Object, null, (a, b, c, d, e) => "test"); _snapshot.Setup(x => x.EntityId).Returns("test"); _fullevent.Setup(x => x.Event).Returns(_snapshot.Object); }