protected async Task <bool> ContainsAsync(IContentStoreInternal store, ContentHash contentHash) { var r = await store.ContainsAsync(Context, contentHash); Clock.Increment(); return(r); }
public Task ContainsFalse() { var context = new Context(Logger); return(TestStore(context, _clock, async store => { IContentStoreInternal cas = store; var contentHash = ContentHash.Random(); (await cas.ContainsAsync(context, contentHash)).Should().BeFalse(); })); }
protected async Task AssertDoesNotContain(IContentStoreInternal store, ContentHash contentHash) { var contains = await store.ContainsAsync(Context, contentHash); contains.Should().BeFalse($"Expected hash={contentHash.ToShortString()} to not be present but was"); }
protected async Task AssertContainsHash(IContentStoreInternal store, ContentHash contentHash) { var contains = await store.ContainsAsync(Context, contentHash); contains.Should().BeTrue($"Expected hash={contentHash} to be present but was not"); }