Interface IContentTestBuilder
Used for testing Microsoft.AspNetCore.Mvc.ContentResult.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface IContentTestBuilder : IBaseTestBuilderWithActionResult<ContentResult>, IBaseTestBuilderWithInvokedAction, IBaseTestBuilderWithAction, IBaseTestBuilderWithComponent, IBaseTestBuilder
Methods
| Improve this Doc View SourceWithContentType(MediaTypeHeaderValue)
Tests whether Microsoft.AspNetCore.Mvc.ContentResult has the same content type as the provided MediaTypeHeaderValue.
Declaration
IAndContentTestBuilder WithContentType(MediaTypeHeaderValue contenType)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Net.Http.Headers.MediaTypeHeaderValue | contenType | Content type as MediaTypeHeaderValue. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder. |
WithContentType(String)
Tests whether Microsoft.AspNetCore.Mvc.ContentResult has the same content type as the provided string.
Declaration
IAndContentTestBuilder WithContentType(string contenType)
Parameters
Type | Name | Description |
---|---|---|
System.String | contenType | Content type as string. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder. |
WithStatusCode(Int32)
Tests whether Microsoft.AspNetCore.Mvc.ContentResult has the same status code as the provided one.
Declaration
IAndContentTestBuilder WithStatusCode(int statusCode)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | statusCode | Status code as integer. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder. |
WithStatusCode(HttpStatusCode)
Tests whether Microsoft.AspNetCore.Mvc.ContentResult has the same status code as the provided HttpStatusCode.
Declaration
IAndContentTestBuilder WithStatusCode(HttpStatusCode statusCode)
Parameters
Type | Name | Description |
---|---|---|
System.Net.HttpStatusCode | statusCode | HttpStatusCode enumeration. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Content.IAndContentTestBuilder. |