MY TESTED ASP.NET CORE MVC DOCS
  • Tutorial
  • Testing Guide
  • API Reference
  • Troubleshoot
  • About
  • API Reference
  • MyTested.AspNetCore.Mvc
  • ComponentShouldHaveTestBuilderTempDataExtensions
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

Class ComponentShouldHaveTestBuilderTempDataExtensions

Contains Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary extension methods for IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>.

Inheritance
System.Object
ComponentShouldHaveTestBuilderTempDataExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.TempData.dll
Syntax
public static class ComponentShouldHaveTestBuilderTempDataExtensions

Methods

| Improve this Doc View Source

NoTempData<TBuilder>(IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>)

Tests whether the component does not set any Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary entries.

Declaration
public static TBuilder NoTempData<TBuilder>(this IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> builder)where TBuilder : IBaseTestBuilder
Parameters
Type Name Description
IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> builder

Instance of IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> type.

Returns
Type Description
TBuilder

The same component should have test builder.

Type Parameters
Name Description
TBuilder Class representing ASP.NET Core MVC test builder.
| Improve this Doc View Source

TempData<TBuilder>(IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>, Action<ITempDataTestBuilder>)

Tests whether the component sets specific entries in the Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary.

Declaration
public static TBuilder TempData<TBuilder>(this IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> builder, Action<ITempDataTestBuilder> tempDataTestBuilder)where TBuilder : IBaseTestBuilder
Parameters
Type Name Description
IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> builder

Instance of IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> type.

System.Action<ITempDataTestBuilder> tempDataTestBuilder

Builder for testing specific Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary entries.

Returns
Type Description
TBuilder

The same component should have test builder.

Type Parameters
Name Description
TBuilder Class representing ASP.NET Core MVC test builder.
| Improve this Doc View Source

TempData<TBuilder>(IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>, Nullable<Int32>)

Tests whether the component sets entries in the Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary.

Declaration
public static TBuilder TempData<TBuilder>(this IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> builder, int ? withNumberOfEntries = null)where TBuilder : IBaseTestBuilder
Parameters
Type Name Description
IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> builder

Instance of IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder> type.

System.Nullable<System.Int32> withNumberOfEntries

Expected number of Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary entries. If default null is provided, the test builder checks only if any entries are found.

Returns
Type Description
TBuilder

The same component should have test builder.

Type Parameters
Name Description
TBuilder Class representing ASP.NET Core MVC test builder.
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • NoTempData<TBuilder>(IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>)
    • TempData<TBuilder>(IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>, Action<ITempDataTestBuilder>)
    • TempData<TBuilder>(IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>, Nullable<Int32>)
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX