Exemple #1
0
    public async Task StoreAndGet_StoresEmptyValues()
    {
        var store = new TestOutputCache();
        var key   = "abc";
        var entry = new OutputCacheEntry()
        {
            Body    = new CachedResponseBody(new List <byte[]>(), 0),
            Headers = new HeaderDictionary(),
            Tags    = Array.Empty <string>()
        };

        await OutputCacheEntryFormatter.StoreAsync(key, entry, TimeSpan.Zero, store, default);

        var result = await OutputCacheEntryFormatter.GetAsync(key, store, default);

        AssertEntriesAreSame(entry, result);
    }