|
8 | 8 | using Builders.Data; |
9 | 9 | using Internal.TestContexts; |
10 | 10 |
|
| 11 | + /// <summary> |
| 12 | + /// Contains <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary"/> extension methods for <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/>. |
| 13 | + /// </summary> |
11 | 14 | public static class ComponentBuilderTempDataWithoutExtensions |
12 | 15 | { |
| 16 | + /// <summary> |
| 17 | + /// Remove entity by providing its key from <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary"/>. |
| 18 | + /// </summary> |
| 19 | + /// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam> |
| 20 | + /// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param> |
| 21 | + /// <param name="key">The key of the entity to be deleted.</param> |
| 22 | + /// <returns>The same component builder.</returns> |
13 | 23 | public static TBuilder WithoutTempData<TBuilder>( |
14 | 24 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
15 | 25 | string key) |
16 | 26 | where TBuilder : IBaseTestBuilder |
17 | 27 | => builder.WithoutTempData(tempData => tempData.WithoutEntry(key)); |
18 | 28 |
|
| 29 | + /// <summary> |
| 30 | + /// Remove entities by providing their keys from <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary"/>. |
| 31 | + /// </summary> |
| 32 | + /// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam> |
| 33 | + /// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param> |
| 34 | + /// <param name="keys">The keys of the entities to be deleted.</param> |
| 35 | + /// <returns>The same component builder.</returns> |
19 | 36 | public static TBuilder WithoutTempData<TBuilder>( |
20 | 37 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
21 | 38 | params string[] keys) |
22 | 39 | where TBuilder : IBaseTestBuilder |
23 | 40 | => builder.WithoutTempData(tempData => tempData.WithoutEntries(keys)); |
24 | 41 |
|
| 42 | + /// <summary> |
| 43 | + /// Remove entities by providing their keys from <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary"/>. |
| 44 | + /// </summary> |
| 45 | + /// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam> |
| 46 | + /// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param> |
| 47 | + /// <param name="keys">The keys of the entities to be deleted.</param> |
| 48 | + /// <returns>The same component builder.</returns> |
25 | 49 | public static TBuilder WithoutTempData<TBuilder>( |
26 | 50 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
27 | 51 | IEnumerable<string> keys) |
28 | 52 | where TBuilder : IBaseTestBuilder |
29 | 53 | => builder.WithoutTempData(tempData => tempData.WithoutEntries(keys)); |
30 | 54 |
|
| 55 | + /// <summary> |
| 56 | + /// Removing all entities from <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary"/>. |
| 57 | + /// </summary> |
| 58 | + /// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam> |
| 59 | + /// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param> |
| 60 | + /// <returns>The same component builder.</returns> |
31 | 61 | public static TBuilder WithoutTempData<TBuilder>( |
32 | 62 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder) |
33 | 63 | where TBuilder : IBaseTestBuilder |
34 | 64 | => builder.WithoutTempData(tempData => tempData.WithoutAllEntries()); |
35 | 65 |
|
| 66 | + /// <summary> |
| 67 | + /// Remove values from <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary"/> on the tested component. |
| 68 | + /// </summary> |
| 69 | + /// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam> |
| 70 | + /// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param> |
| 71 | + /// <param name="tempDataBuilder">Action setting the <see cref="Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary"/> values by using <see cref="IWithTempDataBuilder"/>.</param> |
| 72 | + /// <returns>The same component builder.</returns> |
36 | 73 | public static TBuilder WithoutTempData<TBuilder>( |
37 | 74 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
38 | 75 | Action<IWithoutTempDataBuilder> tempDataBuilder) |
|
0 commit comments