public Task DeleteAsync(string key,
                                CancellationToken ct = default)
        {
            var apiKey = GetKey(key);

            return(usageTracker.DeleteAsync(apiKey, ct));
        }
示例#2
0
        public async Task Should_forward_delete_call()
        {
            await sut.DeleteAsync(key, ct);

            A.CallTo(() => usageTracker.DeleteAsync($"{key}_API", A <CancellationToken> ._))
            .MustHaveHappened();
        }
示例#3
0
        Task IDeleter.DeleteAppAsync(IAppEntity app,
                                     CancellationToken ct)
        {
            var key = GetKey(app.Id);

            return(usageTracker.DeleteAsync(key, ct));
        }
        public async Task Should_forward_delete_call()
        {
            await sut.DeleteAsync(key, ct);

            A.CallTo(() => inner.DeleteAsync(key, ct))
            .MustHaveHappened();
        }
        public Task DeleteAsync(string key,
                                CancellationToken ct = default)
        {
            Guard.NotNull(key, nameof(key));

            return(inner.DeleteAsync(key, ct));
        }