Interface IMemoryCacheTestBuilder
Used for testing Microsoft.Extensions.Caching.Memory.IMemoryCache.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Data
Assembly:MyTested.AspNetCore.Mvc.Caching.dll
Syntax
public interface IMemoryCacheTestBuilder
Methods
| Improve this Doc View SourceContainingEntries(IDictionary<Object, Object>)
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains the provided entries.
Declaration
IAndMemoryCacheTestBuilder ContainingEntries(IDictionary<object, object> entries)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IDictionary<System.Object, System.Object> | entries | Dictionary of cache entries. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
ContainingEntry(Action<IMemoryCacheEntryKeyTestBuilder>)
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains specific entry by using a builder.
Declaration
IAndMemoryCacheTestBuilder ContainingEntry(Action<IMemoryCacheEntryKeyTestBuilder> memoryCacheEntryTestBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<IMemoryCacheEntryKeyTestBuilder> | memoryCacheEntryTestBuilder | Builder for setting specific cache entry tests. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
ContainingEntry(Object, Object)
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains entry with the provided key and corresponding value.
Declaration
IAndMemoryCacheTestBuilder ContainingEntry(object key, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | key | Key of the cache entry. |
| System.Object | value | Value of the cache entry. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
ContainingEntry(Object, Object, MemoryCacheEntryOptions)
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains entry with the provided key, corresponding value and the deeply equal options to the given ones.
Declaration
IAndMemoryCacheTestBuilder ContainingEntry(object key, object value, MemoryCacheEntryOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | key | Key of the cache entry. |
| System.Object | value | Value of the cache entry. |
| Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions | options | MemoryCacheEntryOptions of the cache entry. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
ContainingEntryOfType<TValue>()
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains entry with value of the provided type.
Declaration
IAndMemoryCacheTestBuilder ContainingEntryOfType<TValue>()
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
Type Parameters
| Name | Description |
|---|---|
| TValue | Type of the cache entry value. |
ContainingEntryOfType<TValue>(Object)
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains entry with value of the provided type and the given key.
Declaration
IAndMemoryCacheTestBuilder ContainingEntryOfType<TValue>(object key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | key | Key of the cache entry. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
Type Parameters
| Name | Description |
|---|---|
| TValue | Type of the cache entry value. |
ContainingEntryWithKey(Object)
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains entry with the provided key.
Declaration
IAndMemoryCacheTestBuilder ContainingEntryWithKey(object key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | key | Key of the cache entry. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
ContainingEntryWithValue<TValue>(TValue)
Tests whether the Microsoft.Extensions.Caching.Memory.IMemoryCache contains entry with the provided value.
Declaration
IAndMemoryCacheTestBuilder ContainingEntryWithValue<TValue>(TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TValue | value | Value of the cache entry. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
Type Parameters
| Name | Description |
|---|---|
| TValue | Type of the cache entry value. |