MY TESTED ASP.NET CORE MVC DOCS
  • Tutorial
  • Testing Guide
  • API Reference
  • Troubleshoot
  • About
  • API Reference
  • MyTested.AspNetCore.Mvc.Builders.Contracts.Data
  • IMemoryCacheEntryTestBuilder
Show / Hide Table of Contents
  • Common Classes & Extensions
    • ActionAttributesTestBuilderViewFeaturesExtensions
    • AuthenticationScheme
    • BadRequestTestBuilderDataAnnotationsExtensions
    • BadRequestTestBuilderExtensions
    • BaseShouldReturnTestBuilderExtensions
    • BaseTestBuilderWithResponseModelExtensions
    • ComponentBuilderAuthenticationExtensions
    • ComponentBuilderCachingExtensions
    • ComponentBuilderDependencyInjectionExtensions
    • ComponentBuilderEntityFrameworkCoreExtensions
    • ComponentBuilderHttpExtensions
    • ComponentBuilderOptionsExtensions
    • ComponentBuilderRoutingExtensions
    • ComponentBuilderSessionExtensions
    • ComponentBuilderTempDataExtensions
    • ComponentShouldHaveTestBuilderCachingExtensions
    • ComponentShouldHaveTestBuilderEntityFrameworkCoreExtensions
    • ComponentShouldHaveTestBuilderHttpExtensions
    • ComponentShouldHaveTestBuilderModelStateExtensions
    • ComponentShouldHaveTestBuilderSessionExtensions
    • ComponentShouldHaveTestBuilderTempDataExtensions
    • ComponentShouldHaveTestBuilderViewBagExtensions
    • ComponentShouldHaveTestBuilderViewDataExtensions
    • ContentType
    • ControllerBuilderDataAnnotationsExtensions
    • CreatedTestBuilderExtensions
    • From
    • HttpHeader
    • HttpMethod
    • HttpRequestBuilderAuthenticationExtensions
    • HttpRequestBuilderViewFeaturesExtensions
    • HttpScheme
    • HttpStatusCode
    • LocalRedirectTestBuilderExtensions
    • ModelErrorDetailsTestBuilderViewFeaturesExtensions
    • ModelErrorTestBuilderViewFeaturesExtensions
    • MyApplication
    • MyController<TController>
    • MyMvc
    • MyRouting
    • MyViewComponent<TViewComponent>
    • RedirectTestBuilderExtensions
    • ResolvedRouteTestBuilderDataAnnotationsExtensions
    • ServiceCollectionAbstractionsExtensions
    • ServiceCollectionCachingExtensions
    • ServiceCollectionControllersExtensions
    • ServiceCollectionCoreExtensions
    • ServiceCollectionEntityFrameworkCoreExtensions
    • ServiceCollectionExtensions
    • ServiceCollectionHttpExtensions
    • ServiceCollectionOptionsExtensions
    • ServiceCollectionRoutingExtensions
    • ServiceCollectionSessionExtensions
    • ServiceCollectionTempDataExtensions
    • ServiceCollectionUniverseExtensions
    • ServiceCollectionViewComponentsExtensions
    • ServiceCollectionViewFeaturesExtensions
    • ShouldReturnTestBuilderExtensions
    • ShouldReturnTestBuilderJsonResultExtensions
    • ShouldReturnTestBuilderPartialViewResultExtensions
    • ShouldReturnTestBuilderViewComponentResultExtensions
    • ShouldReturnTestBuilderViewResultExtensions
    • ViewComponentShouldReturnTestBuilderExtensions
    • With
  • ActionResults.BadRequest
    • IBadRequestErrorMessageTestBuilder
    • IBadRequestTestBuilder
  • ActionResults.Challenge
    • IChallengeTestBuilder
  • ActionResults.Content
    • IContentTestBuilder
  • ActionResults.Created
    • ICreatedTestBuilder
  • ActionResults.File
    • IFileTestBuilder
    • IPhysicalFileTestBuilder
  • ActionResults.Forbid
    • IForbidTestBuilder
  • ActionResults.Json
    • IJsonSerializerSettingsTestBuilder
    • IJsonTestBuilder
  • ActionResults.LocalRedirect
    • ILocalRedirectTestBuilder
  • ActionResults.NotFound
    • INotFoundTestBuilder
  • ActionResults.Object
    • IObjectTestBuilder
  • ActionResults.Ok
    • IOkTestBuilder
  • ActionResults.Redirect
    • IRedirectTestBuilder
  • ActionResults.StatusCode
    • IStatusCodeTestBuilder
  • ActionResults.View
    • IViewComponentTestBuilder
    • IViewTestBuilder
  • Actions
    • IActionResultTestBuilder<TActionResult>
    • IShouldHaveTestBuilder<TActionResult>
    • IShouldReturnTestBuilder<TActionResult>
    • IVoidActionResultTestBuilder
  • Application
    • IApplicationConfigurationBuilder
  • Attributes
    • IActionAttributesTestBuilder
    • IBaseAttributesTestBuilder<TAttributesTestBuilder>
    • IControllerActionAttributesTestBuilder<TAttributesTestBuilder>
    • IControllerAttributesTestBuilder
    • IViewComponentAttributesTestBuilder
  • Authentication
    • IAuthenticationPropertiesTestBuilder
    • IClaimsIdentityBuilder
    • IClaimsPrincipalBuilder
  • Base
    • IBaseTestBuilder
    • IBaseTestBuilderWithAction
    • IBaseTestBuilderWithActionResult<TActionResult>
    • IBaseTestBuilderWithComponent
    • IBaseTestBuilderWithComponentBuilder<TBuilder>
    • IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>
    • IBaseTestBuilderWithController
    • IBaseTestBuilderWithInvokedAction
    • IBaseTestBuilderWithModel<TModel>
    • IBaseTestBuilderWithModelError
    • IBaseTestBuilderWithResponseModel
    • IBaseTestBuilderWithViewComponent
    • IBaseTestBuilderWithViewComponentInvocation
    • IBaseTestBuilderWithViewComponentResult<TInvocationResult>
  • CaughtExceptions
    • IAggregateExceptionTestBuilder
    • IBaseExceptionTestBuilder
    • IExceptionMessageTestBuilder
    • IExceptionTestBuilder
    • IShouldThrowTestBuilder
  • Controllers
    • IControllerBuilder<TController>
    • IControllerTestBuilder
  • Data
    • IDataProviderEntryDetailsTestBuilder<TValue>
    • IDataProviderEntryKeyTestBuilder
    • IDataProviderEntryTestBuilder
    • IDbContextBuilder
    • IDbContextTestBuilder
    • IMemoryCacheBuilder
    • IMemoryCacheEntryBuilder
    • IMemoryCacheEntryDetailsTestBuilder<TValue>
    • IMemoryCacheEntryKeyBuilder
    • IMemoryCacheEntryKeyTestBuilder
    • IMemoryCacheEntryTestBuilder
    • IMemoryCacheTestBuilder
    • ISessionBuilder
    • ISessionTestBuilder
    • ITempDataBuilder
    • ITempDataTestBuilder
    • IViewBagTestBuilder
    • IViewDataTestBuilder
  • Http
    • IHttpRequestBuilder
    • IHttpResponseTestBuilder
    • IResponseCookieTestBuilder
  • Invocations
    • IBaseShouldReturnTestBuilder
    • IBaseShouldReturnTestBuilder<TInvocationResult, TBuilder>
    • IBaseShouldReturnTestBuilder<TInvocationResult>
    • IViewComponentResultTestBuilder<TInvocationResult>
    • IViewComponentShouldHaveTestBuilder<TInvocationResult>
    • IViewComponentShouldReturnTestBuilder<TInvocationResult>
  • Models
    • IModelDetailsTestBuilder<TModel>
    • IModelErrorDetailsTestBuilder
    • IModelErrorDetailsTestBuilder<TModel>
    • IModelErrorTestBuilder
    • IModelErrorTestBuilder<TModel>
    • IModelStateTestBuilder
  • Options
    • IOptionsBuilder
  • Routing
    • IResolvedRouteTestBuilder
    • IRouteTestBuilder
    • IShouldMapTestBuilder
  • Services
    • IServicesBuilder
  • Uri
    • IUriBuilder
    • IUriTestBuilder
  • ViewComponentResults
    • IViewTestBuilder
  • ViewComponents
    • IViewComponentBuilder<TViewComponent>
    • IViewComponentTestBuilder

Interface IMemoryCacheEntryTestBuilder

Used for testing Microsoft.Extensions.Caching.Memory.IMemoryCache entry.

Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Data
Assembly:MyTested.AspNetCore.Mvc.Caching.dll
Syntax
public interface IMemoryCacheEntryTestBuilder

Methods

| Improve this Doc View Source

WithAbsoluteExpiration(Nullable<DateTimeOffset>)

Sets the Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions.AbsoluteExpiration value to the built Microsoft.Extensions.Caching.Memory.IMemoryCache entry.

Declaration
IAndMemoryCacheEntryTestBuilder WithAbsoluteExpiration(DateTimeOffset? absoluteExpiration)
Parameters
Type Name Description
System.Nullable<System.DateTimeOffset> absoluteExpiration

Absolute expiration value to set.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder.

| Improve this Doc View Source

WithAbsoluteExpirationRelativeToNow(Nullable<TimeSpan>)

Sets the Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions.AbsoluteExpirationRelativeToNow value to the built Microsoft.Extensions.Caching.Memory.IMemoryCache entry.

Declaration
IAndMemoryCacheEntryTestBuilder WithAbsoluteExpirationRelativeToNow(TimeSpan? absoluteExpirationRelativeToNow)
Parameters
Type Name Description
System.Nullable<System.TimeSpan> absoluteExpirationRelativeToNow

Absolute expiration relative to now value to set.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder.

| Improve this Doc View Source

WithPriority(CacheItemPriority)

Sets the Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions.Priority value to the built Microsoft.Extensions.Caching.Memory.IMemoryCache entry.

Declaration
IAndMemoryCacheEntryTestBuilder WithPriority(CacheItemPriority priority)
Parameters
Type Name Description
Microsoft.Extensions.Caching.Memory.CacheItemPriority priority

CacheItemPriority value to set.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder.

| Improve this Doc View Source

WithSlidingExpiration(Nullable<TimeSpan>)

Sets the Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions.SlidingExpiration value to the built Microsoft.Extensions.Caching.Memory.IMemoryCache entry.

Declaration
IAndMemoryCacheEntryTestBuilder WithSlidingExpiration(TimeSpan? slidingExpiration)
Parameters
Type Name Description
System.Nullable<System.TimeSpan> slidingExpiration

Sliding expiration value to set.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder.

| Improve this Doc View Source

WithValue(Object)

Sets the value of the built Microsoft.Extensions.Caching.Memory.IMemoryCache entry.

Declaration
IAndMemoryCacheEntryTestBuilder WithValue(object value)
Parameters
Type Name Description
System.Object value

Cache entry value to set.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheEntryTestBuilder.

| Improve this Doc View Source

WithValueOfType<TValue>()

Tests whether the built Microsoft.Extensions.Caching.Memory.IMemoryCache entry has value of the provided type.

Declaration
IMemoryCacheEntryDetailsTestBuilder<TValue> WithValueOfType<TValue>()
Returns
Type Description
IMemoryCacheEntryDetailsTestBuilder<TValue>

Test builder of IMemoryCacheEntryDetailsTestBuilder<TValue> type.

Type Parameters
Name Description
TValue Type of cache entry value.
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • WithAbsoluteExpiration(Nullable<DateTimeOffset>)
    • WithAbsoluteExpirationRelativeToNow(Nullable<TimeSpan>)
    • WithPriority(CacheItemPriority)
    • WithSlidingExpiration(Nullable<TimeSpan>)
    • WithValue(Object)
    • WithValueOfType<TValue>()
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX