MY TESTED ASP.NET CORE MVC DOCS
Show / Hide Table of Contents

Interface IResponseCookieTestBuilder

Used for testing Microsoft.AspNetCore.Http.HttpResponse cookie.

Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Http
Assembly:MyTested.AspNetCore.Mvc.Http.dll
Syntax
public interface IResponseCookieTestBuilder

Methods

| Improve this Doc View Source

WithDomain(String)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.Domain property is the same as provided one.

Declaration
IAndResponseCookieTestBuilder WithDomain(string domain)
Parameters
Type Name Description
System.String domain

Expected domain of the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithExpired(Nullable<DateTimeOffset>)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.Expires property is the same as provided one.

Declaration
IAndResponseCookieTestBuilder WithExpired(DateTimeOffset? expires)
Parameters
Type Name Description
System.Nullable<System.DateTimeOffset> expires

Expected expiration date time offset of the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithHttpOnly(Boolean)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.HttpOnly property is the same as provided one.

Declaration
IAndResponseCookieTestBuilder WithHttpOnly(bool httpOnly)
Parameters
Type Name Description
System.Boolean httpOnly

Expected Microsoft.Net.Http.Headers.SetCookieHeaderValue.HttpOnly property of the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithMaxAge(Nullable<TimeSpan>)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.MaxAge property is the same as provided one.

Declaration
IAndResponseCookieTestBuilder WithMaxAge(TimeSpan? maxAge)
Parameters
Type Name Description
System.Nullable<System.TimeSpan> maxAge

Expected Microsoft.Net.Http.Headers.SetCookieHeaderValue.MaxAge property of the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithName(String)

Sets the expected Microsoft.Net.Http.Headers.SetCookieHeaderValue.Name of the tested cookie.

Declaration
IAndResponseCookieTestBuilder WithName(string name)
Parameters
Type Name Description
System.String name

Name to set on the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithPath(String)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.Path property is the same as provided one.

Declaration
IAndResponseCookieTestBuilder WithPath(string path)
Parameters
Type Name Description
System.String path

Expected Microsoft.Net.Http.Headers.SetCookieHeaderValue.Path property of the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithSecure(Boolean)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.Secure property is the same as provided one.

Declaration
IAndResponseCookieTestBuilder WithSecure(bool secure)
Parameters
Type Name Description
System.Boolean secure

Expected Microsoft.Net.Http.Headers.SetCookieHeaderValue.Secure property of the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithValue(Action<String>)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.Value passes the provided assertions.

Declaration
IAndResponseCookieTestBuilder WithValue(Action<string> assertions)
Parameters
Type Name Description
System.Action<System.String> assertions

Action containing assertions on the cookie value.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithValue(Func<String, Boolean>)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.Value passes the provided predicate.

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

Predicate testing the cookie value.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

| Improve this Doc View Source

WithValue(String)

Tests whether the Microsoft.Net.Http.Headers.SetCookieHeaderValue.Value property is the same as the provided one.

Declaration
IAndResponseCookieTestBuilder WithValue(string value)
Parameters
Type Name Description
System.String value

Expected value of the cookie.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndResponseCookieTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Http.IAndHttpResponseTestBuilder.

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX