MY TESTED ASP.NET CORE MVC DOCS
  • Tutorial
  • Testing Guide
  • API Reference
  • Troubleshoot
  • About
  • API Reference
  • MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created
  • ICreatedTestBuilder
Show / Hide Table of Contents
  • Common Classes & Extensions
    • ActionAttributesTestBuilderViewFeaturesExtensions
    • AuthenticationScheme
    • BadRequestTestBuilderDataAnnotationsExtensions
    • BadRequestTestBuilderExtensions
    • BaseShouldReturnTestBuilderExtensions
    • BaseTestBuilderWithResponseModelExtensions
    • ComponentBuilderAuthenticationExtensions
    • ComponentBuilderCachingExtensions
    • ComponentBuilderDependencyInjectionExtensions
    • ComponentBuilderEntityFrameworkCoreExtensions
    • ComponentBuilderHttpExtensions
    • ComponentBuilderOptionsExtensions
    • ComponentBuilderRoutingExtensions
    • ComponentBuilderSessionExtensions
    • ComponentBuilderTempDataExtensions
    • ComponentShouldHaveTestBuilderCachingExtensions
    • ComponentShouldHaveTestBuilderEntityFrameworkCoreExtensions
    • ComponentShouldHaveTestBuilderHttpExtensions
    • ComponentShouldHaveTestBuilderModelStateExtensions
    • ComponentShouldHaveTestBuilderSessionExtensions
    • ComponentShouldHaveTestBuilderTempDataExtensions
    • ComponentShouldHaveTestBuilderViewBagExtensions
    • ComponentShouldHaveTestBuilderViewDataExtensions
    • ContentType
    • ControllerBuilderDataAnnotationsExtensions
    • CreatedTestBuilderExtensions
    • From
    • HttpHeader
    • HttpMethod
    • HttpRequestBuilderAuthenticationExtensions
    • HttpRequestBuilderViewFeaturesExtensions
    • HttpScheme
    • HttpStatusCode
    • LocalRedirectTestBuilderExtensions
    • ModelErrorDetailsTestBuilderViewFeaturesExtensions
    • ModelErrorTestBuilderViewFeaturesExtensions
    • MyApplication
    • MyController<TController>
    • MyMvc
    • MyRouting
    • MyViewComponent<TViewComponent>
    • RedirectTestBuilderExtensions
    • ResolvedRouteTestBuilderDataAnnotationsExtensions
    • ServiceCollectionAbstractionsExtensions
    • ServiceCollectionCachingExtensions
    • ServiceCollectionControllersExtensions
    • ServiceCollectionCoreExtensions
    • ServiceCollectionEntityFrameworkCoreExtensions
    • ServiceCollectionExtensions
    • ServiceCollectionHttpExtensions
    • ServiceCollectionOptionsExtensions
    • ServiceCollectionRoutingExtensions
    • ServiceCollectionSessionExtensions
    • ServiceCollectionTempDataExtensions
    • ServiceCollectionUniverseExtensions
    • ServiceCollectionViewComponentsExtensions
    • ServiceCollectionViewFeaturesExtensions
    • ShouldReturnTestBuilderExtensions
    • ShouldReturnTestBuilderJsonResultExtensions
    • ShouldReturnTestBuilderPartialViewResultExtensions
    • ShouldReturnTestBuilderViewComponentResultExtensions
    • ShouldReturnTestBuilderViewResultExtensions
    • ViewComponentShouldReturnTestBuilderExtensions
    • With
  • ActionResults.BadRequest
    • IBadRequestErrorMessageTestBuilder
    • IBadRequestTestBuilder
  • ActionResults.Challenge
    • IChallengeTestBuilder
  • ActionResults.Content
    • IContentTestBuilder
  • ActionResults.Created
    • ICreatedTestBuilder
  • ActionResults.File
    • IFileTestBuilder
    • IPhysicalFileTestBuilder
  • ActionResults.Forbid
    • IForbidTestBuilder
  • ActionResults.Json
    • IJsonSerializerSettingsTestBuilder
    • IJsonTestBuilder
  • ActionResults.LocalRedirect
    • ILocalRedirectTestBuilder
  • ActionResults.NotFound
    • INotFoundTestBuilder
  • ActionResults.Object
    • IObjectTestBuilder
  • ActionResults.Ok
    • IOkTestBuilder
  • ActionResults.Redirect
    • IRedirectTestBuilder
  • ActionResults.StatusCode
    • IStatusCodeTestBuilder
  • ActionResults.View
    • IViewComponentTestBuilder
    • IViewTestBuilder
  • Actions
    • IActionResultTestBuilder<TActionResult>
    • IShouldHaveTestBuilder<TActionResult>
    • IShouldReturnTestBuilder<TActionResult>
    • IVoidActionResultTestBuilder
  • Application
    • IApplicationConfigurationBuilder
  • Attributes
    • IActionAttributesTestBuilder
    • IBaseAttributesTestBuilder<TAttributesTestBuilder>
    • IControllerActionAttributesTestBuilder<TAttributesTestBuilder>
    • IControllerAttributesTestBuilder
    • IViewComponentAttributesTestBuilder
  • Authentication
    • IAuthenticationPropertiesTestBuilder
    • IClaimsIdentityBuilder
    • IClaimsPrincipalBuilder
  • Base
    • IBaseTestBuilder
    • IBaseTestBuilderWithAction
    • IBaseTestBuilderWithActionResult<TActionResult>
    • IBaseTestBuilderWithComponent
    • IBaseTestBuilderWithComponentBuilder<TBuilder>
    • IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>
    • IBaseTestBuilderWithController
    • IBaseTestBuilderWithInvokedAction
    • IBaseTestBuilderWithModel<TModel>
    • IBaseTestBuilderWithModelError
    • IBaseTestBuilderWithResponseModel
    • IBaseTestBuilderWithViewComponent
    • IBaseTestBuilderWithViewComponentInvocation
    • IBaseTestBuilderWithViewComponentResult<TInvocationResult>
  • CaughtExceptions
    • IAggregateExceptionTestBuilder
    • IBaseExceptionTestBuilder
    • IExceptionMessageTestBuilder
    • IExceptionTestBuilder
    • IShouldThrowTestBuilder
  • Controllers
    • IControllerBuilder<TController>
    • IControllerTestBuilder
  • Data
    • IDataProviderEntryDetailsTestBuilder<TValue>
    • IDataProviderEntryKeyTestBuilder
    • IDataProviderEntryTestBuilder
    • IDbContextBuilder
    • IDbContextTestBuilder
    • IMemoryCacheBuilder
    • IMemoryCacheEntryBuilder
    • IMemoryCacheEntryDetailsTestBuilder<TValue>
    • IMemoryCacheEntryKeyBuilder
    • IMemoryCacheEntryKeyTestBuilder
    • IMemoryCacheEntryTestBuilder
    • IMemoryCacheTestBuilder
    • ISessionBuilder
    • ISessionTestBuilder
    • ITempDataBuilder
    • ITempDataTestBuilder
    • IViewBagTestBuilder
    • IViewDataTestBuilder
  • Http
    • IHttpRequestBuilder
    • IHttpResponseTestBuilder
    • IResponseCookieTestBuilder
  • Invocations
    • IBaseShouldReturnTestBuilder
    • IBaseShouldReturnTestBuilder<TInvocationResult, TBuilder>
    • IBaseShouldReturnTestBuilder<TInvocationResult>
    • IViewComponentResultTestBuilder<TInvocationResult>
    • IViewComponentShouldHaveTestBuilder<TInvocationResult>
    • IViewComponentShouldReturnTestBuilder<TInvocationResult>
  • Models
    • IModelDetailsTestBuilder<TModel>
    • IModelErrorDetailsTestBuilder
    • IModelErrorDetailsTestBuilder<TModel>
    • IModelErrorTestBuilder
    • IModelErrorTestBuilder<TModel>
    • IModelStateTestBuilder
  • Options
    • IOptionsBuilder
  • Routing
    • IResolvedRouteTestBuilder
    • IRouteTestBuilder
    • IShouldMapTestBuilder
  • Services
    • IServicesBuilder
  • Uri
    • IUriBuilder
    • IUriTestBuilder
  • ViewComponentResults
    • IViewTestBuilder
  • ViewComponents
    • IViewComponentBuilder<TViewComponent>
    • IViewComponentTestBuilder

Interface ICreatedTestBuilder

Used for testing Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult.

Inherited Members
IBaseTestBuilderWithComponent.ShouldPassForThe<TComponent>(Action<TComponent>)
IBaseTestBuilderWithComponent.ShouldPassForThe<TComponent>(Func<TComponent, Boolean>)
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface ICreatedTestBuilder : IBaseTestBuilderWithResponseModel, IBaseTestBuilderWithActionResult<ObjectResult>, IBaseTestBuilderWithInvokedAction, IBaseTestBuilderWithAction, IBaseTestBuilderWithComponent, IBaseTestBuilder

Methods

| Improve this Doc View Source

AtAction(String)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult has specific action name.

Declaration
IAndCreatedTestBuilder AtAction(string actionName)
Parameters
Type Name Description
System.String actionName

Expected action name.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

AtController(String)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult has specific controller name.

Declaration
IAndCreatedTestBuilder AtController(string controllerName)
Parameters
Type Name Description
System.String controllerName

Expected controller name.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

AtLocation(Action<IUriTestBuilder>)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult has specific location provided by builder.

Declaration
IAndCreatedTestBuilder AtLocation(Action<IUriTestBuilder> uriTestBuilder)
Parameters
Type Name Description
System.Action<IUriTestBuilder> uriTestBuilder

Builder for expected URI.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

AtLocation(String)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult has specific location provided by string.

Declaration
IAndCreatedTestBuilder AtLocation(string location)
Parameters
Type Name Description
System.String location

Expected location as string.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

AtLocation(Uri)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult has specific location provided by Uri.

Declaration
IAndCreatedTestBuilder AtLocation(Uri location)
Parameters
Type Name Description
System.Uri location

Expected location as Uri.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

AtLocationPassing(Action<String>)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult location passes the given assertions.

Declaration
IAndCreatedTestBuilder AtLocationPassing(Action<string> assertions)
Parameters
Type Name Description
System.Action<System.String> assertions

Action containing all assertions on the location.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

AtLocationPassing(Func<String, Boolean>)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult location passes the given predicate.

Declaration
IAndCreatedTestBuilder AtLocationPassing(Func<string, bool> predicate)
Parameters
Type Name Description
System.Func<System.String, System.Boolean> predicate

Predicate testing the location.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingContentType(MediaTypeHeaderValue)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the content type provided as MediaTypeHeaderValue.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingContentType(String)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the content type provided as string.

Declaration
IAndCreatedTestBuilder ContainingContentType(string contentType)
Parameters
Type Name Description
System.String contentType

Content type as string.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingContentTypes(MediaTypeHeaderValue[])

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the same content types provided as MediaTypeHeaderValue parameters.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingContentTypes(IEnumerable<MediaTypeHeaderValue>)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the same content types provided as collection of MediaTypeHeaderValue.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingContentTypes(IEnumerable<String>)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the same content types provided as collection of strings.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingContentTypes(String[])

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the same content types provided as string parameters.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingOutputFormatter(IOutputFormatter)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the provided output formatter.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingOutputFormatterOfType<TOutputFormatter>()

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains output formatter of the provided type.

Declaration
IAndCreatedTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()where TOutputFormatter : IOutputFormatter
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

Type Parameters
Name Description
TOutputFormatter Type of IOutputFormatter.
| Improve this Doc View Source

ContainingOutputFormatters(IOutputFormatter[])

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the provided output formatters.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingOutputFormatters(IEnumerable<IOutputFormatter>)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the provided output formatters.

Declaration
IAndCreatedTestBuilder 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.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingRouteKey(String)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains specific route key.

Declaration
IAndCreatedTestBuilder ContainingRouteKey(string key)
Parameters
Type Name Description
System.String key

Expected route key.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingRouteValue(String, Object)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains specific route key and value.

Declaration
IAndCreatedTestBuilder ContainingRouteValue(string key, object value)
Parameters
Type Name Description
System.String key

Expected route key.

System.Object value

Expected route value.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingRouteValue<TRouteValue>(TRouteValue)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains specific route value.

Declaration
IAndCreatedTestBuilder ContainingRouteValue<TRouteValue>(TRouteValue value)
Parameters
Type Name Description
TRouteValue value

Expected route value.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

Type Parameters
Name Description
TRouteValue Type of the route value.
| Improve this Doc View Source

ContainingRouteValueOfType<TRouteValue>()

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains specific route value of the given type.

Declaration
IAndCreatedTestBuilder ContainingRouteValueOfType<TRouteValue>()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

Type Parameters
Name Description
TRouteValue Expected type of the route value.
| Improve this Doc View Source

ContainingRouteValueOfType<TRouteValue>(String)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains specific route value of the given type with the provided key.

Declaration
IAndCreatedTestBuilder ContainingRouteValueOfType<TRouteValue>(string key)
Parameters
Type Name Description
System.String key

Expected route key.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

Type Parameters
Name Description
TRouteValue Expected type of the route value.
| Improve this Doc View Source

ContainingRouteValues(IDictionary<String, Object>)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the provided route values.

Declaration
IAndCreatedTestBuilder ContainingRouteValues(IDictionary<string, object> routeValues)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.String, System.Object> routeValues

Expected route value dictionary.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

ContainingRouteValues(Object)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult contains the provided route values.

Declaration
IAndCreatedTestBuilder ContainingRouteValues(object routeValues)
Parameters
Type Name Description
System.Object routeValues

Expected route value dictionary.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

WithRouteName(String)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtRouteResult has specific route name.

Declaration
IAndCreatedTestBuilder WithRouteName(string routeName)
Parameters
Type Name Description
System.String routeName

Expected route name.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

WithStatusCode(Int32)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult has the same status code as the provided one.

Declaration
IAndCreatedTestBuilder WithStatusCode(int statusCode)
Parameters
Type Name Description
System.Int32 statusCode

Status code as integer.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

WithStatusCode(HttpStatusCode)

Tests whether Microsoft.AspNetCore.Mvc.CreatedResult, Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult has the same status code as the provided HttpStatusCode.

Declaration
IAndCreatedTestBuilder WithStatusCode(HttpStatusCode statusCode)
Parameters
Type Name Description
System.Net.HttpStatusCode statusCode

HttpStatusCode enumeration.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

WithUrlHelper(IUrlHelper)

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult has the same URL helper as the provided one.

Declaration
IAndCreatedTestBuilder WithUrlHelper(IUrlHelper urlHelper)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper

URL helper of type IUrlHelper.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

| Improve this Doc View Source

WithUrlHelperOfType<TUrlHelper>()

Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult has the same URL helper type as the provided one.

Declaration
IAndCreatedTestBuilder WithUrlHelperOfType<TUrlHelper>()where TUrlHelper : IUrlHelper
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder.

Type Parameters
Name Description
TUrlHelper URL helper of type IUrlHelper.

Extension Methods

CreatedTestBuilderExtensions.At<TController>(Expression<Action<TController>>)
CreatedTestBuilderExtensions.At<TController>(Expression<Func<TController, Task>>)
BaseTestBuilderWithResponseModelExtensions.WithNoModel()
BaseTestBuilderWithResponseModelExtensions.WithModelOfType(Type)
BaseTestBuilderWithResponseModelExtensions.WithModelOfType<TModel>()
BaseTestBuilderWithResponseModelExtensions.WithModel<TModel>(TModel)
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • AtAction(String)
    • AtController(String)
    • AtLocation(Action<IUriTestBuilder>)
    • AtLocation(String)
    • AtLocation(Uri)
    • AtLocationPassing(Action<String>)
    • AtLocationPassing(Func<String, Boolean>)
    • ContainingContentType(MediaTypeHeaderValue)
    • ContainingContentType(String)
    • ContainingContentTypes(MediaTypeHeaderValue[])
    • ContainingContentTypes(IEnumerable<MediaTypeHeaderValue>)
    • ContainingContentTypes(IEnumerable<String>)
    • ContainingContentTypes(String[])
    • ContainingOutputFormatter(IOutputFormatter)
    • ContainingOutputFormatterOfType<TOutputFormatter>()
    • ContainingOutputFormatters(IOutputFormatter[])
    • ContainingOutputFormatters(IEnumerable<IOutputFormatter>)
    • ContainingRouteKey(String)
    • ContainingRouteValue(String, Object)
    • ContainingRouteValue<TRouteValue>(TRouteValue)
    • ContainingRouteValueOfType<TRouteValue>()
    • ContainingRouteValueOfType<TRouteValue>(String)
    • ContainingRouteValues(IDictionary<String, Object>)
    • ContainingRouteValues(Object)
    • WithRouteName(String)
    • WithStatusCode(Int32)
    • WithStatusCode(HttpStatusCode)
    • WithUrlHelper(IUrlHelper)
    • WithUrlHelperOfType<TUrlHelper>()
  • Extension Methods
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX