1
1
using System ;
2
2
using System . Diagnostics ;
3
3
using FluentAssertions . Execution ;
4
- using FluentAssertions . Mvc ;
5
4
using FluentAssertions . Primitives ;
6
5
using Microsoft . AspNetCore . Mvc ;
7
6
8
- namespace FluentAssertions . AspNetCore . Mvc
7
+ namespace FluentAssertions . Mvc
9
8
{
10
9
/// <summary>
11
10
/// Contains a number of methods to assert that a <see cref="ViewResult" /> is in the expected state.
12
11
/// </summary>
13
12
[ DebuggerNonUserCode ]
14
- public class ViewResultAssertions < T > : ObjectAssertions
15
- where T : ViewResult
13
+ public class ViewResultAssertions : ObjectAssertions
16
14
{
17
15
/// <summary>
18
16
/// Initializes a new instance of the <see cref="T:ViewResultAssertions" /> class.
19
17
/// </summary>
20
18
/// <param name="subject">The object to test assertion on</param>
21
- public ViewResultAssertions ( T subject ) : base ( subject )
19
+ public ViewResultAssertions ( ViewResult subject ) : base ( subject )
22
20
{
23
21
}
24
22
25
- private T ViewResultSubject => ( T ) Subject ;
23
+ private ViewResult ViewResultSubject => ( ViewResult ) Subject ;
26
24
27
25
/// <summary>
28
26
/// The model.
@@ -40,7 +38,7 @@ public ViewResultAssertions(T subject) : base(subject)
40
38
/// <param name="reasonArgs">
41
39
/// Zero or more objects to format using the placeholders in <see cref="reason" />.
42
40
/// </param>
43
- public ViewResultAssertions < T > WithViewName ( string expectedViewName , string reason = "" ,
41
+ public ViewResultAssertions WithViewName ( string expectedViewName , string reason = "" ,
44
42
params object [ ] reasonArgs )
45
43
{
46
44
var actualViewName = ViewResultSubject . ViewName ;
@@ -64,7 +62,7 @@ public ViewResultAssertions<T> WithViewName(string expectedViewName, string reas
64
62
/// <param name="reasonArgs">
65
63
/// Zero or more objects to format using the placeholders in <see cref="reason" />.
66
64
/// </param>
67
- public ViewResultAssertions < T > WithViewData ( string key , object expectedValue , string reason = "" ,
65
+ public ViewResultAssertions WithViewData ( string key , object expectedValue , string reason = "" ,
68
66
params object [ ] reasonArgs )
69
67
{
70
68
var actualViewData = ViewResultSubject . ViewData ;
@@ -96,7 +94,7 @@ public ViewResultAssertions<T> WithViewData(string key, object expectedValue, st
96
94
/// <param name="reasonArgs">
97
95
/// Zero or more objects to format using the placeholders in <see cref="reason" />.
98
96
/// </param>
99
- public ViewResultAssertions < T > WithTempData ( string key , object expectedValue , string reason = "" ,
97
+ public ViewResultAssertions WithTempData ( string key , object expectedValue , string reason = "" ,
100
98
params object [ ] reasonArgs )
101
99
{
102
100
var actualTempData = ViewResultSubject . TempData ;
@@ -140,7 +138,7 @@ public TModel ModelAs<TModel>()
140
138
/// <param name="reasonArgs">
141
139
/// Zero or more objects to format using the placeholders in <see cref="reason" />.
142
140
/// </param>
143
- public ViewResultAssertions < T > WithDefaultViewName ( string reason = "" , params object [ ] reasonArgs )
141
+ public ViewResultAssertions WithDefaultViewName ( string reason = "" , params object [ ] reasonArgs )
144
142
{
145
143
var viewName = ViewResultSubject . ViewName ;
146
144
0 commit comments