26 references to MediaTypeAssert
Microsoft.AspNetCore.Mvc.Core.Test (21)
ContentResultTest.cs (1)
42MediaTypeAssert.Equal("text/plain; charset=utf-16", httpContext.Response.ContentType);
ControllerBaseTest.cs (1)
2268MediaTypeAssert.Equal(contentType, contentResult.ContentType);
Formatters\FormatFilterTest.cs (4)
54MediaTypeAssert.Equal(mediaType, objectResult.ContentTypes[0]); 98MediaTypeAssert.Equal(mediaType, objectResult.ContentTypes[0]); 130MediaTypeAssert.Equal(mediaType, objectResult.ContentTypes[0]); 353MediaTypeAssert.Equal(mediaType, result.ContentTypes[0]);
Formatters\FormatterMappingsTest.cs (1)
39MediaTypeAssert.Equal(contentType, returnMediaType);
Infrastructure\ObjectResultExecutorTest.cs (9)
41MediaTypeAssert.Equal("text/xml; charset=utf-8", httpContext.Response.ContentType); 66MediaTypeAssert.Equal("text/plain; charset=utf-8", httpContext.Response.ContentType); 134MediaTypeAssert.Equal("application/problem+xml; charset=utf-8", httpContext.Response.ContentType); 156MediaTypeAssert.Equal("application/problem+xml; charset=utf-8", httpContext.Response.ContentType); 178MediaTypeAssert.Equal("application/problem+xml; charset=utf-8", httpContext.Response.ContentType); 204MediaTypeAssert.Equal("application/problem+json; charset=utf-8", httpContext.Response.ContentType); 229MediaTypeAssert.Equal("application/problem+xml; charset=utf-8", httpContext.Response.ContentType); 250MediaTypeAssert.Equal("application/problem+xml; charset=utf-8", httpContext.Response.ContentType); 433MediaTypeAssert.Equal(expectedContentType, responseContentType);
ProducesAttributeTests.cs (2)
33MediaTypeAssert.Equal(mediaType1, objectResult.ContentTypes[0]); 34MediaTypeAssert.Equal(mediaType2, objectResult.ContentTypes[1]);
ProducesResponseTypeAttributeTests.cs (2)
21MediaTypeAssert.Equal(mediaType1, producesContentAttribute.ContentTypes[0]); 22MediaTypeAssert.Equal(mediaType2, producesContentAttribute.ContentTypes[1]);
VirtualFileResultTest.cs (1)
45MediaTypeAssert.Equal(expectedMediaType, result.ContentType);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
PageModelTest.cs (1)
1653MediaTypeAssert.Equal(contentType, contentResult.ContentType);
PageTest.cs (1)
1643MediaTypeAssert.Equal(contentType, contentResult.ContentType);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
ViewComponentResultTest.cs (2)
569MediaTypeAssert.Equal(expectedContentType, resultContentType); 575MediaTypeAssert.Equal(contentTypeBeforeViewResultExecution, contentTypeAfterViewResultExecution);
ViewExecutorTest.cs (1)
155MediaTypeAssert.Equal(expectedContentType, context.Response.ContentType);