Interface IObjectTestBuilder
Used for testing Microsoft.AspNetCore.Mvc.ObjectResult.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface IObjectTestBuilder : IBaseTestBuilderWithResponseModel, IBaseTestBuilderWithActionResult<ObjectResult>, IBaseTestBuilderWithInvokedAction, IBaseTestBuilderWithAction, IBaseTestBuilderWithComponent, IBaseTestBuilder
Methods
| Improve this Doc View SourceContainingContentType(MediaTypeHeaderValue)
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the content type provided as MediaTypeHeaderValue.
Declaration
IAndObjectTestBuilder ContainingContentType(MediaTypeHeaderValue contentType)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Net.Http.Headers.MediaTypeHeaderValue | contentType | Content type as MediaTypeHeaderValue. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingContentType(String)
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the content type provided as string.
Declaration
IAndObjectTestBuilder ContainingContentType(string contentType)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentType | Content type as string. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingContentTypes(MediaTypeHeaderValue[])
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the same content types provided as MediaTypeHeaderValue parameters.
Declaration
IAndObjectTestBuilder ContainingContentTypes(params MediaTypeHeaderValue[] contentTypes)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Net.Http.Headers.MediaTypeHeaderValue[] | contentTypes | Content types as MediaTypeHeaderValue parameters. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingContentTypes(IEnumerable<MediaTypeHeaderValue>)
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the same content types provided as collection of MediaTypeHeaderValue.
Declaration
IAndObjectTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Microsoft.Net.Http.Headers.MediaTypeHeaderValue> | contentTypes | Content types as collection of MediaTypeHeaderValue. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingContentTypes(IEnumerable<String>)
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the same content types provided as collection of strings.
Declaration
IAndObjectTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | contentTypes | Content types as collection of strings. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingContentTypes(String[])
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the same content types provided as string parameters.
Declaration
IAndObjectTestBuilder ContainingContentTypes(params string[] contentTypes)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | contentTypes | Content types as string parameters. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingOutputFormatter(IOutputFormatter)
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the provided IOutputFormatter.
Declaration
IAndObjectTestBuilder ContainingOutputFormatter(IOutputFormatter outputFormatter)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter | outputFormatter | Instance of IOutputFormatter. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingOutputFormatterOfType<TOutputFormatter>()
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains IOutputFormatter of the provided type.
Declaration
IAndObjectTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()where TOutputFormatter : IOutputFormatter
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
Type Parameters
Name | Description |
---|---|
TOutputFormatter | Type of IOutputFormatter. |
ContainingOutputFormatters(IOutputFormatter[])
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the provided output formatters.
Declaration
IAndObjectTestBuilder ContainingOutputFormatters(params IOutputFormatter[] outputFormatters)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter[] | outputFormatters | IOutputFormatter parameters. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
ContainingOutputFormatters(IEnumerable<IOutputFormatter>)
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult contains the provided output formatters.
Declaration
IAndObjectTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter> | outputFormatters | Collection of IOutputFormatter. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
WithStatusCode(Int32)
Tests whether Microsoft.AspNetCore.Mvc.ObjectResult has the same status code as the provided one.
Declaration
IAndObjectTestBuilder WithStatusCode(int statusCode)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | statusCode | Status code as integer. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |
WithStatusCode(HttpStatusCode)
Tests whether object has the same status code as the provided HttpStatusCode.
Declaration
IAndObjectTestBuilder WithStatusCode(HttpStatusCode statusCode)
Parameters
Type | Name | Description |
---|---|---|
System.Net.HttpStatusCode | statusCode | HttpStatusCode enumeration. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Object.IAndObjectTestBuilder. |