@@ -105,26 +105,21 @@ public void ContainsFormatter_GivenUnexpected_ShouldFail()
105
105
. WithMessage ( failureMessage ) ;
106
106
}
107
107
108
-
109
-
110
-
111
-
112
-
113
108
[ Fact ]
114
- public void ContainsContentType_GivenExpected_ShouldPass ( )
109
+ public void WithContentType_GivenExpected_ShouldPass ( )
115
110
{
116
111
var mediaType = "text/html" ;
117
112
var result = new ObjectResult ( TestValue )
118
113
{
119
114
ContentTypes = { mediaType }
120
115
} ;
121
116
122
- result . Should ( ) . BeObjectResult ( ) . ContainsContentType ( mediaType ) ;
117
+ result . Should ( ) . BeObjectResult ( ) . WithContentType ( mediaType ) ;
123
118
}
124
119
#if NETCOREAPP2_1
125
120
// In NetCore3.1 ContentTypes cant be null.
126
121
[ Fact ]
127
- public void ContainsContentType_OnNullMediaType_ShouldFail ( )
122
+ public void WithContentType_OnNullMediaType_ShouldFail ( )
128
123
{
129
124
var expected = "text/json" ;
130
125
var result = new ObjectResult ( TestValue )
@@ -135,14 +130,14 @@ public void ContainsContentType_OnNullMediaType_ShouldFail()
135
130
"ObjectResult.ContentTypes" ,
136
131
expected ) ;
137
132
138
- Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . ContainsContentType ( expected , Reason , ReasonArgs ) ;
133
+ Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . WithContentType ( expected , Reason , ReasonArgs ) ;
139
134
140
135
a . Should ( ) . Throw < Exception > ( )
141
136
. WithMessage ( failureMessage ) ;
142
137
}
143
138
#endif
144
139
[ Fact ]
145
- public void ContainsContentType_GivenUnexpected_ShouldFail ( )
140
+ public void WithContentType_GivenUnexpected_ShouldFail ( )
146
141
{
147
142
var mediaType = "text/html" ;
148
143
var expected = "text/json" ;
@@ -155,7 +150,7 @@ public void ContainsContentType_GivenUnexpected_ShouldFail()
155
150
result . ContentTypes ,
156
151
expected ) ;
157
152
158
- Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . ContainsContentType ( expected , Reason , ReasonArgs ) ;
153
+ Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . WithContentType ( expected , Reason , ReasonArgs ) ;
159
154
160
155
a . Should ( ) . Throw < Exception > ( )
161
156
. WithMessage ( failureMessage ) ;
0 commit comments