Expectations
Technical reference of Expectativas.
This API is used in Expectations.
Symbols
| Symbol | Class | Description |
|---|---|---|
| ExpectedStringRule | type | ExpectedStringRule defines a public type of API. |
| ExpectedStringEqual | type | ExpectedStringEqual defines a public type of API. |
| ExpectedStringNotEqual | type | ExpectedStringNotEqual defines a public type of API. |
| ExpectedStringContains | type | ExpectedStringContains defines a public type of API. |
| ExpectedStringNotContains | type | ExpectedStringNotContains defines a public type of API. |
| ExpectedStringExists | type | ExpectedStringExists defines a public type of API. |
| ExpectedStringNotExists | type | ExpectedStringNotExists defines a public type of API. |
| ExpectedStringEqual.MatchString | func | Compare a textual value to the rule. |
| ExpectedStringNotEqual.MatchString | func | Compare a textual value to the rule. |
| ExpectedStringContains.MatchString | func | Compare a textual value to the rule. |
| ExpectedStringNotContains.MatchString | func | Compare a textual value to the rule. |
| ExpectedStringExists.MatchString | func | Compare a textual value to the rule. |
| ExpectedStringNotExists.MatchString | func | Compare a textual value to the rule. |
| Expect | var | Expect it exposes a shared value of the package. |
| Expect.Equal | func | It builds a rule of equality. |
| Expect.NotEqual | func | It builds a rule of inequality. |
| Expect.Contains | func | It indicates whether a key contains a specific value. |
| Expect.NotContains | func | It builds a rule of absence. |
| Expect.Exists | func | It builds a rule of existence. |
| Expect.NotExists | func | It builds a rule of non-existence. |
| Expect.JSONEqual | func | It builds a JSON equality rule. |
| Expect.JSONNotEqual | func | It builds a rule of JSON inequality. |
| Expect.JSONContains | func | It builds a JSON inclusion rule. |
| Expect.JSONNotContains | func | It builds a JSON rule of exclusion. |
| ExpectedStringEqual.MatchBody | func | Compare the body with the rule. |
| ExpectedStringNotEqual.MatchBody | func | Compare the body with the rule. |
| ExpectedStringContains.MatchBody | func | Compare the body with the rule. |
| ExpectedStringNotContains.MatchBody | func | Compare the body with the rule. |
| ExpectedHeadersRule | type | ExpectedHeadersRule defines a public type of API. |
| ExpectedHeadersEqual | type | ExpectedHeadersEqual defines a public type of API. |
| ExpectedHeadersContains | type | ExpectedHeadersContains defines a public type of API. |
| ExpectedHeadersNotContains | type | ExpectedHeadersNotContains defines a public type of API. |
| ExpectedHeadersCustom | type | ExpectedHeadersCustom defines a public type of API. |
| ExpectedHeadersEqual.MatchHeaders | func | Compare the header collection. |
| ExpectedHeadersContains.MatchHeaders | func | Compare the header collection. |
| ExpectedHeadersNotContains.MatchHeaders | func | Compare the header collection. |
| ExpectedHeadersCustom.MatchHeaders | func | Compare the header collection. |
| ExpectedHeaders | var | ExpectedHeaders it exposes a shared value of the package. |
| ExpectedHeaders.Equal | func | It builds a rule of equality. |
| ExpectedHeaders.Contains | func | It indicates whether a key contains a specific value. |
| ExpectedHeaders.NotContains | func | It builds a rule of absence. |
| ExpectedHeaders.Custom | func | It builds a composite rule. |
| ExpectedCookiesRule | type | ExpectedCookiesRule defines a public type of API. |
| ExpectedCookiesEqual | type | ExpectedCookiesEqual defines a public type of API. |
| ExpectedCookiesContains | type | ExpectedCookiesContains defines a public type of API. |
| ExpectedCookiesNotContains | type | ExpectedCookiesNotContains defines a public type of API. |
| ExpectedCookiesCustom | type | ExpectedCookiesCustom defines a public type of API. |
| ExpectedCookiesEqual.MatchCookies | func | Compare the collection of cookies. |
| ExpectedCookiesContains.MatchCookies | func | Compare the collection of cookies. |
| ExpectedCookiesNotContains.MatchCookies | func | Compare the collection of cookies. |
| ExpectedCookiesCustom.MatchCookies | func | Compare the collection of cookies. |
| ExpectedCookies | var | ExpectedCookies it exposes a shared value of the package. |
| ExpectedCookies.Equal | func | It builds a rule of equality. |
| ExpectedCookies.Contains | func | It indicates whether a key contains a specific value. |
| ExpectedCookies.NotContains | func | It builds a rule of absence. |
| ExpectedCookies.Custom | func | It builds a composite rule. |
| ExpectedActionErrorRule | type | ExpectedActionErrorRule defines a public type of API. |
| ExpectedActionResultRule | type | ExpectedActionResultRule defines a public type of API. |
| ExpectedActionErrorNil | type | ExpectedActionErrorNil defines a public type of API. |
| ExpectedActionErrorExact | type | ExpectedActionErrorExact defines a public type of API. |
| ExpectedActionErrorNil.MatchActionError | func | Compare the error produced by an Action. |
| ExpectedActionErrorExact.MatchActionError | func | Compare the error produced by an Action. |
| ExpectedActionError | var | ExpectedActionError it exposes a shared value of the package. |
| ExpectedActionError.Nil | func | It builds a rule that requires a lack of error. |
| ExpectedActionError.Exact | func | It builds an exact equality rule. |
| ExpectedActionResultExact | type | ExpectedActionResultExact defines a public type of API. |
| ExpectedActionResultPartial | type | ExpectedActionResultPartial defines a public type of API. |
| ExpectedActionResultExact.MatchActionResult | func | Compare the result produced by an Action. |
| ExpectedActionResultPartial.MatchActionResult | func | Compare the result produced by an Action. |
| ExpectedActionResult | var | ExpectedActionResult it exposes a shared value of the package. |
| ExpectedActionResult.Exact | func | It builds an exact equality rule. |
| ExpectedActionResult.Partial | func | It builds a partial comparison. |
ExpectedStringRule
Declaration:
type ExpectedStringRule interface {
MatchString(response string, exists bool) MatchValue
} ExpectedStringRule defines a public type of API.
ExpectedStringEqual
Declaration:
type ExpectedStringEqual struct{ Value string } ExpectedStringEqual defines a public type of API.
ExpectedStringNotEqual
Declaration:
type ExpectedStringNotEqual struct{ Value string } ExpectedStringNotEqual defines a public type of API.
ExpectedStringContains
Declaration:
type ExpectedStringContains struct{ Value string } ExpectedStringContains defines a public type of API.
ExpectedStringNotContains
Declaration:
type ExpectedStringNotContains struct{ Value string } ExpectedStringNotContains defines a public type of API.
ExpectedStringExists
Declaration:
type ExpectedStringExists struct{} ExpectedStringExists defines a public type of API.
ExpectedStringNotExists
Declaration:
type ExpectedStringNotExists struct{} ExpectedStringNotExists defines a public type of API.
ExpectedStringEqual.MatchString
Declaration:
func (r ExpectedStringEqual) MatchString(response string, exists bool) MatchValue Compare a textual value to the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
response | string | Type value string required by the operation. |
exists | bool | Type value bool required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | MatchValue | Type value MatchValue produced by the operation. |
Usage syntax
value := expectedStringEqual.MatchString(value, value) ExpectedStringNotEqual.MatchString
Declaration:
func (r ExpectedStringNotEqual) MatchString(response string, exists bool) MatchValue Compare a textual value to the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
response | string | Type value string required by the operation. |
exists | bool | Type value bool required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | MatchValue | Type value MatchValue produced by the operation. |
Usage syntax
value := expectedStringNotEqual.MatchString(value, value) ExpectedStringContains.MatchString
Declaration:
func (r ExpectedStringContains) MatchString(response string, exists bool) MatchValue Compare a textual value to the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
response | string | Type value string required by the operation. |
exists | bool | Type value bool required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | MatchValue | Type value MatchValue produced by the operation. |
Usage syntax
value := expectedStringContains.MatchString(value, value) ExpectedStringNotContains.MatchString
Declaration:
func (r ExpectedStringNotContains) MatchString(response string, exists bool) MatchValue Compare a textual value to the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
response | string | Type value string required by the operation. |
exists | bool | Type value bool required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | MatchValue | Type value MatchValue produced by the operation. |
Usage syntax
value := expectedStringNotContains.MatchString(value, value) ExpectedStringExists.MatchString
Declaration:
func (ExpectedStringExists) MatchString(response string, exists bool) MatchValue Compare a textual value to the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
response | string | Type value string required by the operation. |
exists | bool | Type value bool required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | MatchValue | Type value MatchValue produced by the operation. |
Usage syntax
value := expectedStringExists.MatchString(value, value) ExpectedStringNotExists.MatchString
Declaration:
func (ExpectedStringNotExists) MatchString(response string, exists bool) MatchValue Compare a textual value to the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
response | string | Type value string required by the operation. |
exists | bool | Type value bool required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | MatchValue | Type value MatchValue produced by the operation. |
Usage syntax
value := expectedStringNotExists.MatchString(value, value) Expect
Declaration:
var Expect expectFactory Expect it exposes a shared value of the package.
Expect.Equal
Declaration:
func (expectFactory) Equal(value string) ExpectedStringEqual It builds a rule of equality.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedStringEqual | Type value ExpectedStringEqual produced by the operation. |
Usage syntax
value := test.Expect.Equal(value) Expect.NotEqual
Declaration:
func (expectFactory) NotEqual(value string) ExpectedStringNotEqual It builds a rule of inequality.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedStringNotEqual | Type value ExpectedStringNotEqual produced by the operation. |
Usage syntax
value := test.Expect.NotEqual(value) Expect.Contains
Declaration:
func (expectFactory) Contains(value string) ExpectedStringContains It indicates whether a key contains a specific value.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedStringContains | Type value ExpectedStringContains produced by the operation. |
Usage syntax
value := test.Expect.Contains(value) Expect.NotContains
Declaration:
func (expectFactory) NotContains(value string) ExpectedStringNotContains It builds a rule of absence.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedStringNotContains | Type value ExpectedStringNotContains produced by the operation. |
Usage syntax
value := test.Expect.NotContains(value) Expect.Exists
Declaration:
func (expectFactory) Exists() ExpectedStringExists { return ExpectedStringExists It builds a rule of existence.
Returns
| Return | Type | Description |
|---|---|---|
ExpectedStringExists { return | ExpectedStringExists | Type value ExpectedStringExists produced by the operation. |
Usage syntax
ExpectedStringExists { return := test.Expect.Exists() Expect.NotExists
Declaration:
func (expectFactory) NotExists() ExpectedStringNotExists { return ExpectedStringNotExists It builds a rule of non-existence.
Returns
| Return | Type | Description |
|---|---|---|
ExpectedStringNotExists { return | ExpectedStringNotExists | Type value ExpectedStringNotExists produced by the operation. |
Usage syntax
ExpectedStringNotExists { return := test.Expect.NotExists() Expect.JSONEqual
Declaration:
func (expectFactory) JSONEqual(value any) ExpectedBodyJSONEqual It builds a JSON equality rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedBodyJSONEqual | Type value ExpectedBodyJSONEqual produced by the operation. |
Usage syntax
value := test.Expect.JSONEqual(value) Expect.JSONNotEqual
Declaration:
func (expectFactory) JSONNotEqual(value any) ExpectedBodyJSONNotEqual It builds a rule of JSON inequality.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedBodyJSONNotEqual | Type value ExpectedBodyJSONNotEqual produced by the operation. |
Usage syntax
value := test.Expect.JSONNotEqual(value) Expect.JSONContains
Declaration:
func (expectFactory) JSONContains(value any) ExpectedBodyJSONContains It builds a JSON inclusion rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedBodyJSONContains | Type value ExpectedBodyJSONContains produced by the operation. |
Usage syntax
value := test.Expect.JSONContains(value) Expect.JSONNotContains
Declaration:
func (expectFactory) JSONNotContains(value any) ExpectedBodyJSONNotContains It builds a JSON rule of exclusion.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedBodyJSONNotContains | Type value ExpectedBodyJSONNotContains produced by the operation. |
Usage syntax
value := test.Expect.JSONNotContains(value) ExpectedStringEqual.MatchBody
Declaration:
func (r ExpectedStringEqual) MatchBody(body []byte) BodyMatchResult Compare the body with the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | []byte | Type value []byte required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | BodyMatchResult | Type value BodyMatchResult produced by the operation. |
Usage syntax
value := expectedStringEqual.MatchBody(value) ExpectedStringNotEqual.MatchBody
Declaration:
func (r ExpectedStringNotEqual) MatchBody(body []byte) BodyMatchResult Compare the body with the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | []byte | Type value []byte required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | BodyMatchResult | Type value BodyMatchResult produced by the operation. |
Usage syntax
value := expectedStringNotEqual.MatchBody(value) ExpectedStringContains.MatchBody
Declaration:
func (r ExpectedStringContains) MatchBody(body []byte) BodyMatchResult Compare the body with the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | []byte | Type value []byte required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | BodyMatchResult | Type value BodyMatchResult produced by the operation. |
Usage syntax
value := expectedStringContains.MatchBody(value) ExpectedStringNotContains.MatchBody
Declaration:
func (r ExpectedStringNotContains) MatchBody(body []byte) BodyMatchResult Compare the body with the rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | []byte | Type value []byte required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | BodyMatchResult | Type value BodyMatchResult produced by the operation. |
Usage syntax
value := expectedStringNotContains.MatchBody(value) ExpectedHeadersRule
Declaration:
type ExpectedHeadersRule interface {
MatchHeaders(headers map[string][]string) HeaderMatchResult
} ExpectedHeadersRule defines a public type of API.
ExpectedHeadersEqual
Declaration:
type ExpectedHeadersEqual Map ExpectedHeadersEqual defines a public type of API.
ExpectedHeadersContains
Declaration:
type ExpectedHeadersContains Map ExpectedHeadersContains defines a public type of API.
ExpectedHeadersNotContains
Declaration:
type ExpectedHeadersNotContains Map ExpectedHeadersNotContains defines a public type of API.
ExpectedHeadersCustom
Declaration:
type ExpectedHeadersCustom map[string]ExpectedStringRule ExpectedHeadersCustom defines a public type of API.
ExpectedHeadersEqual.MatchHeaders
Declaration:
func (r ExpectedHeadersEqual) MatchHeaders(headers map[string][]string) HeaderMatchResult Compare the header collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
headers | map[string][]string | Type value map[string][]string required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedHeadersEqual.MatchHeaders(value) ExpectedHeadersContains.MatchHeaders
Declaration:
func (r ExpectedHeadersContains) MatchHeaders(headers map[string][]string) HeaderMatchResult Compare the header collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
headers | map[string][]string | Type value map[string][]string required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedHeadersContains.MatchHeaders(value) ExpectedHeadersNotContains.MatchHeaders
Declaration:
func (r ExpectedHeadersNotContains) MatchHeaders(headers map[string][]string) HeaderMatchResult Compare the header collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
headers | map[string][]string | Type value map[string][]string required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedHeadersNotContains.MatchHeaders(value) ExpectedHeadersCustom.MatchHeaders
Declaration:
func (r ExpectedHeadersCustom) MatchHeaders(headers map[string][]string) HeaderMatchResult Compare the header collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
headers | map[string][]string | Type value map[string][]string required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedHeadersCustom.MatchHeaders(value) ExpectedHeaders
Declaration:
var ExpectedHeaders expectedHeadersFactory ExpectedHeaders it exposes a shared value of the package.
ExpectedHeaders.Equal
Declaration:
func (expectedHeadersFactory) Equal(values Map) ExpectedHeadersEqual It builds a rule of equality.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Map | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedHeadersEqual | Type value ExpectedHeadersEqual produced by the operation. |
Usage syntax
value := test.ExpectedHeaders.Equal(value) ExpectedHeaders.Contains
Declaration:
func (expectedHeadersFactory) Contains(values Map) ExpectedHeadersContains It indicates whether a key contains a specific value.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Map | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedHeadersContains | Type value ExpectedHeadersContains produced by the operation. |
Usage syntax
value := test.ExpectedHeaders.Contains(value) ExpectedHeaders.NotContains
Declaration:
func (expectedHeadersFactory) NotContains(values Map) ExpectedHeadersNotContains It builds a rule of absence.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Map | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedHeadersNotContains | Type value ExpectedHeadersNotContains produced by the operation. |
Usage syntax
value := test.ExpectedHeaders.NotContains(value) ExpectedHeaders.Custom
Declaration:
func (expectedHeadersFactory) Custom(values map[string]ExpectedStringRule) ExpectedHeadersCustom It builds a composite rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | map[string]ExpectedStringRule | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedHeadersCustom | Type value ExpectedHeadersCustom produced by the operation. |
Usage syntax
value := test.ExpectedHeaders.Custom(value) ExpectedCookiesRule
Declaration:
type ExpectedCookiesRule interface {
MatchCookies(cookies []*http.Cookie) HeaderMatchResult
} ExpectedCookiesRule defines a public type of API.
ExpectedCookiesEqual
Declaration:
type ExpectedCookiesEqual Map ExpectedCookiesEqual defines a public type of API.
ExpectedCookiesContains
Declaration:
type ExpectedCookiesContains Map ExpectedCookiesContains defines a public type of API.
ExpectedCookiesNotContains
Declaration:
type ExpectedCookiesNotContains Map ExpectedCookiesNotContains defines a public type of API.
ExpectedCookiesCustom
Declaration:
type ExpectedCookiesCustom map[string]ExpectedStringRule ExpectedCookiesCustom defines a public type of API.
ExpectedCookiesEqual.MatchCookies
Declaration:
func (r ExpectedCookiesEqual) MatchCookies(cookies []*http.Cookie) HeaderMatchResult Compare the collection of cookies.
Parameters
| Parameter | Type | Description |
|---|---|---|
cookies | []*http.Cookie | Type value []*http.Cookie required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedCookiesEqual.MatchCookies(nil) ExpectedCookiesContains.MatchCookies
Declaration:
func (r ExpectedCookiesContains) MatchCookies(cookies []*http.Cookie) HeaderMatchResult Compare the collection of cookies.
Parameters
| Parameter | Type | Description |
|---|---|---|
cookies | []*http.Cookie | Type value []*http.Cookie required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedCookiesContains.MatchCookies(nil) ExpectedCookiesNotContains.MatchCookies
Declaration:
func (r ExpectedCookiesNotContains) MatchCookies(cookies []*http.Cookie) HeaderMatchResult Compare the collection of cookies.
Parameters
| Parameter | Type | Description |
|---|---|---|
cookies | []*http.Cookie | Type value []*http.Cookie required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedCookiesNotContains.MatchCookies(nil) ExpectedCookiesCustom.MatchCookies
Declaration:
func (r ExpectedCookiesCustom) MatchCookies(cookies []*http.Cookie) HeaderMatchResult Compare the collection of cookies.
Parameters
| Parameter | Type | Description |
|---|---|---|
cookies | []*http.Cookie | Type value []*http.Cookie required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | HeaderMatchResult | Type value HeaderMatchResult produced by the operation. |
Usage syntax
value := expectedCookiesCustom.MatchCookies(nil) ExpectedCookies
Declaration:
var ExpectedCookies expectedCookiesFactory ExpectedCookies it exposes a shared value of the package.
ExpectedCookies.Equal
Declaration:
func (expectedCookiesFactory) Equal(values Map) ExpectedCookiesEqual It builds a rule of equality.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Map | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedCookiesEqual | Type value ExpectedCookiesEqual produced by the operation. |
Usage syntax
value := test.ExpectedCookies.Equal(value) ExpectedCookies.Contains
Declaration:
func (expectedCookiesFactory) Contains(values Map) ExpectedCookiesContains It indicates whether a key contains a specific value.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Map | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedCookiesContains | Type value ExpectedCookiesContains produced by the operation. |
Usage syntax
value := test.ExpectedCookies.Contains(value) ExpectedCookies.NotContains
Declaration:
func (expectedCookiesFactory) NotContains(values Map) ExpectedCookiesNotContains It builds a rule of absence.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Map | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedCookiesNotContains | Type value ExpectedCookiesNotContains produced by the operation. |
Usage syntax
value := test.ExpectedCookies.NotContains(value) ExpectedCookies.Custom
Declaration:
func (expectedCookiesFactory) Custom(values map[string]ExpectedStringRule) ExpectedCookiesCustom It builds a composite rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | map[string]ExpectedStringRule | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedCookiesCustom | Type value ExpectedCookiesCustom produced by the operation. |
Usage syntax
value := test.ExpectedCookies.Custom(value) ExpectedActionErrorRule
Declaration:
type ExpectedActionErrorRule interface {
MatchActionError(value any) ActionValueMatchResult
} ExpectedActionErrorRule defines a public type of API.
ExpectedActionResultRule
Declaration:
type ExpectedActionResultRule interface {
MatchActionResult(value any) ActionValueMatchResult
} ExpectedActionResultRule defines a public type of API.
ExpectedActionErrorNil
Declaration:
type ExpectedActionErrorNil struct{} ExpectedActionErrorNil defines a public type of API.
ExpectedActionErrorExact
Declaration:
type ExpectedActionErrorExact struct {
Value any `json:"value"`
} ExpectedActionErrorExact defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
Value | anyjson: "value" " | Value stored. |
ExpectedActionErrorNil.MatchActionError
Declaration:
func (ExpectedActionErrorNil) MatchActionError(value any) ActionValueMatchResult Compare the error produced by an Action.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ActionValueMatchResult | Type value ActionValueMatchResult produced by the operation. |
Usage syntax
value := expectedActionErrorNil.MatchActionError(value) ExpectedActionErrorExact.MatchActionError
Declaration:
func (r ExpectedActionErrorExact) MatchActionError(value any) ActionValueMatchResult Compare the error produced by an Action.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ActionValueMatchResult | Type value ActionValueMatchResult produced by the operation. |
Usage syntax
value := expectedActionErrorExact.MatchActionError(value) ExpectedActionError
Declaration:
var ExpectedActionError expectedActionErrorFactory ExpectedActionError it exposes a shared value of the package.
ExpectedActionError.Nil
Declaration:
func (expectedActionErrorFactory) Nil() ExpectedActionErrorNil It builds a rule that requires a lack of error.
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedActionErrorNil | Type value ExpectedActionErrorNil produced by the operation. |
Usage syntax
value := test.ExpectedActionError.Nil() ExpectedActionError.Exact
Declaration:
func (expectedActionErrorFactory) Exact(value any) ExpectedActionErrorExact It builds an exact equality rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedActionErrorExact | Type value ExpectedActionErrorExact produced by the operation. |
Usage syntax
value := test.ExpectedActionError.Exact(value) ExpectedActionResultExact
Declaration:
type ExpectedActionResultExact struct {
Value any `json:"value"`
} ExpectedActionResultExact defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
Value | anyjson: "value" " | Value stored. |
ExpectedActionResultPartial
Declaration:
type ExpectedActionResultPartial map[string]any ExpectedActionResultPartial defines a public type of API.
ExpectedActionResultExact.MatchActionResult
Declaration:
func (r ExpectedActionResultExact) MatchActionResult(value any) ActionValueMatchResult Compare the result produced by an Action.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ActionValueMatchResult | Type value ActionValueMatchResult produced by the operation. |
Usage syntax
value := expectedActionResultExact.MatchActionResult(value) ExpectedActionResultPartial.MatchActionResult
Declaration:
func (r ExpectedActionResultPartial) MatchActionResult(value any) ActionValueMatchResult Compare the result produced by an Action.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ActionValueMatchResult | Type value ActionValueMatchResult produced by the operation. |
Usage syntax
value := expectedActionResultPartial.MatchActionResult(value) ExpectedActionResult
Declaration:
var ExpectedActionResult expectedActionResultFactory ExpectedActionResult it exposes a shared value of the package.
ExpectedActionResult.Exact
Declaration:
func (expectedActionResultFactory) Exact(value any) ExpectedActionResultExact It builds an exact equality rule.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to be stored or issued. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedActionResultExact | Type value ExpectedActionResultExact produced by the operation. |
Usage syntax
value := test.ExpectedActionResult.Exact(value) ExpectedActionResult.Partial
Declaration:
func (expectedActionResultFactory) Partial(values map[string]any) ExpectedActionResultPartial It builds a partial comparison.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | map[string]any | Values provided to the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | ExpectedActionResultPartial | Type value ExpectedActionResultPartial produced by the operation. |
Usage syntax
value := test.ExpectedActionResult.Partial(value)