|
1 | 1 | namespace MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations
|
2 | 2 | {
|
3 | 3 | using System;
|
4 |
| - using Base; |
| 4 | + using And; |
5 | 5 | using ViewComponentResults;
|
6 | 6 |
|
7 | 7 | /// <summary>
|
8 | 8 | /// Used for testing returned view component result.
|
9 | 9 | /// </summary>
|
10 | 10 | /// <typeparam name="TInvocationResult">Result from invoked view component in ASP.NET Core MVC.</typeparam>
|
11 | 11 | public interface IViewComponentShouldReturnTestBuilder<TInvocationResult>
|
12 |
| - : IBaseShouldReturnTestBuilder<TInvocationResult, IBaseTestBuilderWithViewComponentResult<TInvocationResult>> |
| 12 | + : IBaseShouldReturnTestBuilder<TInvocationResult, IAndTestBuilder> |
13 | 13 | {
|
14 | 14 | /// <summary>
|
15 | 15 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult"/>.
|
16 | 16 | /// </summary>
|
17 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
18 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> Content(); |
| 17 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 18 | + IAndTestBuilder Content(); |
19 | 19 |
|
20 | 20 | /// <summary>
|
21 | 21 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult"/> with expected content.
|
22 | 22 | /// </summary>
|
23 | 23 | /// <param name="content">Expected content as string.</param>
|
24 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
25 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> Content(string content); |
| 24 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 25 | + IAndTestBuilder Content(string content); |
26 | 26 |
|
27 | 27 | /// <summary>
|
28 | 28 | /// Tests whether <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult"/> passes the given assertions.
|
29 | 29 | /// </summary>
|
30 | 30 | /// <param name="assertions">Action containing all assertions on the content.</param>
|
31 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
32 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> Content(Action<string> assertions); |
| 31 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 32 | + IAndTestBuilder Content(Action<string> assertions); |
33 | 33 |
|
34 | 34 | /// <summary>
|
35 | 35 | /// Tests whether <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult"/> passes the given predicate.
|
36 | 36 | /// </summary>
|
37 | 37 | /// <param name="predicate">Predicate testing the content.</param>
|
38 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
39 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> Content(Func<string, bool> predicate); |
| 38 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 39 | + IAndTestBuilder Content(Func<string, bool> predicate); |
40 | 40 |
|
41 | 41 | /// <summary>
|
42 | 42 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Html.IHtmlContent"/>.
|
43 | 43 | /// </summary>
|
44 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
45 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> HtmlContent(); |
| 44 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 45 | + IAndTestBuilder HtmlContent(); |
46 | 46 |
|
47 | 47 | /// <summary>
|
48 | 48 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Html.IHtmlContent"/> with expected content.
|
49 | 49 | /// </summary>
|
50 | 50 | /// <param name="htmlContent">Expected HTML content as string.</param>
|
51 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
52 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> HtmlContent(string htmlContent); |
| 51 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 52 | + IAndTestBuilder HtmlContent(string htmlContent); |
53 | 53 |
|
54 | 54 | /// <summary>
|
55 | 55 | /// Tests whether <see cref="Microsoft.AspNetCore.Html.IHtmlContent"/> passes the given assertions.
|
56 | 56 | /// </summary>
|
57 | 57 | /// <param name="assertions">Action containing all assertions on the HTML content.</param>
|
58 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
59 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> HtmlContent(Action<string> assertions); |
| 58 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 59 | + IAndTestBuilder HtmlContent(Action<string> assertions); |
60 | 60 |
|
61 | 61 | /// <summary>
|
62 | 62 | /// Tests whether <see cref="Microsoft.AspNetCore.Html.IHtmlContent"/> passes the given predicate.
|
63 | 63 | /// </summary>
|
64 | 64 | /// <param name="predicate">Predicate testing the HTML content.</param>
|
65 |
| - /// <returns>Test builder of <see cref="IBaseTestBuilderWithViewComponentResult{TInvocationResult}"/> type.</returns> |
66 |
| - IBaseTestBuilderWithViewComponentResult<TInvocationResult> HtmlContent(Func<string, bool> predicate); |
| 65 | + /// <returns>Test builder of <see cref="IAndTestBuilder"/> type.</returns> |
| 66 | + IAndTestBuilder HtmlContent(Func<string, bool> predicate); |
67 | 67 |
|
68 | 68 | /// <summary>
|
69 | 69 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult"/> with the default view name.
|
70 | 70 | /// </summary>
|
71 |
| - /// <returns>Test builder of <see cref="IViewTestBuilder"/> type.</returns> |
72 |
| - IViewTestBuilder View(); |
| 71 | + /// <returns>Test builder of <see cref="IAndViewTestBuilder"/> type.</returns> |
| 72 | + IAndViewTestBuilder View(); |
73 | 73 |
|
74 | 74 | /// <summary>
|
75 | 75 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult"/> with the provided view name.
|
76 | 76 | /// </summary>
|
77 | 77 | /// <param name="viewName">Expected view name.</param>
|
78 |
| - /// <returns>Test builder of <see cref="IViewTestBuilder"/> type.</returns> |
79 |
| - IViewTestBuilder View(string viewName); |
| 78 | + /// <returns>Test builder of <see cref="IAndViewTestBuilder"/> type.</returns> |
| 79 | + IAndViewTestBuilder View(string viewName); |
80 | 80 |
|
81 | 81 | /// <summary>
|
82 | 82 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult"/> with the provided deeply equal model object.
|
83 | 83 | /// </summary>
|
84 | 84 | /// <typeparam name="TModel">Expected model type.</typeparam>
|
85 | 85 | /// <param name="model">Expected model object.</param>
|
86 |
| - /// <returns>Test builder of <see cref="IViewTestBuilder"/> type.</returns> |
87 |
| - IViewTestBuilder View<TModel>(TModel model); |
| 86 | + /// <returns>Test builder of <see cref="IAndViewTestBuilder"/> type.</returns> |
| 87 | + IAndViewTestBuilder View<TModel>(TModel model); |
88 | 88 |
|
89 | 89 | /// <summary>
|
90 | 90 | /// Tests whether the view component result is <see cref="Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult"/> with the provided view name and deeply equal model object.
|
91 | 91 | /// </summary>
|
92 | 92 | /// <typeparam name="TModel">Expected model type.</typeparam>
|
93 | 93 | /// <param name="viewName">Expected view name.</param>
|
94 | 94 | /// <param name="model">Expected model object.</param>
|
95 |
| - /// <returns>Test builder of <see cref="IViewTestBuilder"/> type.</returns> |
96 |
| - IViewTestBuilder View<TModel>(string viewName, TModel model); |
| 95 | + /// <returns>Test builder of <see cref="IAndViewTestBuilder"/> type.</returns> |
| 96 | + IAndViewTestBuilder View<TModel>(string viewName, TModel model); |
97 | 97 | }
|
98 | 98 | }
|
0 commit comments