Class ComponentShouldHaveTestBuilderTempDataExtensions
Contains Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary extension methods for IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>.
Inheritance
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.TempData.dll
Syntax
public static class ComponentShouldHaveTestBuilderTempDataExtensions
Methods
| Improve this Doc View SourceNoTempData<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. |
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. |
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. |