@@ -105,26 +105,21 @@ public void ContainsFormatter_GivenUnexpected_ShouldFail()
105105 . WithMessage ( failureMessage ) ;
106106 }
107107
108-
109-
110-
111-
112-
113108 [ Fact ]
114- public void ContainsContentType_GivenExpected_ShouldPass ( )
109+ public void WithContentType_GivenExpected_ShouldPass ( )
115110 {
116111 var mediaType = "text/html" ;
117112 var result = new ObjectResult ( TestValue )
118113 {
119114 ContentTypes = { mediaType }
120115 } ;
121116
122- result . Should ( ) . BeObjectResult ( ) . ContainsContentType ( mediaType ) ;
117+ result . Should ( ) . BeObjectResult ( ) . WithContentType ( mediaType ) ;
123118 }
124119#if NETCOREAPP2_1
125120 // In NetCore3.1 ContentTypes cant be null.
126121 [ Fact ]
127- public void ContainsContentType_OnNullMediaType_ShouldFail ( )
122+ public void WithContentType_OnNullMediaType_ShouldFail ( )
128123 {
129124 var expected = "text/json" ;
130125 var result = new ObjectResult ( TestValue )
@@ -135,14 +130,14 @@ public void ContainsContentType_OnNullMediaType_ShouldFail()
135130 "ObjectResult.ContentTypes" ,
136131 expected ) ;
137132
138- Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . ContainsContentType ( expected , Reason , ReasonArgs ) ;
133+ Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . WithContentType ( expected , Reason , ReasonArgs ) ;
139134
140135 a . Should ( ) . Throw < Exception > ( )
141136 . WithMessage ( failureMessage ) ;
142137 }
143138#endif
144139 [ Fact ]
145- public void ContainsContentType_GivenUnexpected_ShouldFail ( )
140+ public void WithContentType_GivenUnexpected_ShouldFail ( )
146141 {
147142 var mediaType = "text/html" ;
148143 var expected = "text/json" ;
@@ -155,7 +150,7 @@ public void ContainsContentType_GivenUnexpected_ShouldFail()
155150 result . ContentTypes ,
156151 expected ) ;
157152
158- Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . ContainsContentType ( expected , Reason , ReasonArgs ) ;
153+ Action a = ( ) => result . Should ( ) . BeObjectResult ( ) . WithContentType ( expected , Reason , ReasonArgs ) ;
159154
160155 a . Should ( ) . Throw < Exception > ( )
161156 . WithMessage ( failureMessage ) ;
0 commit comments