コード例 #1
0
        protected async Task <bool> ContainsAsync(IContentStoreInternal store, ContentHash contentHash)
        {
            var r = await store.ContainsAsync(Context, contentHash);

            Clock.Increment();

            return(r);
        }
コード例 #2
0
        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();
            }));
        }
コード例 #3
0
        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");
        }
コード例 #4
0
        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");
        }