Documentation ¶
Index ¶
- type Arguments
- func (a Arguments) BoolIf(index int, defValue bool) bool
- func (a Arguments) Count() int
- func (a Arguments) ErrorIf(index int, err error) error
- func (a Arguments) GetIf(index int, defValue interface{}) interface{}
- func (a Arguments) Int64(index int) int64
- func (a Arguments) Int64If(index int, defValue int64) int64
- func (a Arguments) StringIf(index int, defValue string) string
- type Mock
- type Require
- func (rq *Require) HTTPRContentTypeEqual(match string, r *http.Response)
- func (rq *Require) HTTPRContentTypeJson(r *http.Response)
- func (rq *Require) HTTPRContentTypeNotEqual(match string, r *http.Response)
- func (rq *Require) HTTPRContentTypeNotJson(r *http.Response)
- func (rq *Require) HTTPRHasCookiesExact(r *http.Response, matches ...string)
- func (rq *Require) HTTPRStatusEqual(status int, r *http.Response)
- func (rq *Require) HTTPRSuccess(r *http.Response)
- type Suite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
Arguments extends the testify/Arguments type
func (Arguments) BoolIf ¶
BoolIf returns the value at the specified index, or the supplied default boolean value, if that argument is not present.
func (Arguments) ErrorIf ¶
ErrorIf returns the error at the specified index, or the supplied default error value, if that argument is not present.
func (Arguments) GetIf ¶
GetIf returns the argument at the specified index, or the supplied default value, if the argument is not present.
func (Arguments) Int64 ¶
Int64 returns the argument at the specified index, as an in64 type. It panics if there is no argument at that index, or if it is not of the expected type.
type Mock ¶
Mock extends the testify/Mock type.
func (*Mock) Called ¶
Called overrides the standard Called mock implementation for two purposes. It automatically traces all mock calls for debugging, and it extends the returned Arguments type to support Int64 types, and conditional return values.
func (*Mock) ListUnusedCalls ¶
ListUnusedCalls returns a formatted string describing the expected calls that have specific call limits that have not yet been made.
func (*Mock) UnusedExpectedCallCount ¶
UnusedExpectedCallCount returns the number of expected calls that were registered via an On call with a specific call limit, via, say, the Once function.
This can be used in a unit test at a known quiet point to verify that calls that the test expects to have been made actually were.
type Require ¶
type Require struct {
*require.Assertions
}
func (*Require) HTTPRContentTypeEqual ¶
HTTPRContentTypeEqual verifies that the content type attribute in the supplied response object matches the expected string.
func (*Require) HTTPRContentTypeJson ¶
HTTPRContentTypeJson verifies that the content type attribute in the supplied response object matches the json specifier ('application/json')
func (*Require) HTTPRContentTypeNotEqual ¶
HTTPRContentTypeNotEqual verifies that the content type attribute in the supplied response object does not match the expected string.
func (*Require) HTTPRContentTypeNotJson ¶
HTTPRContentTypeNotJson verifies that the content type attribute in the supplied response object does not match the json specifier ('application/json')
func (*Require) HTTPRHasCookiesExact ¶
HTTPRHasCookiesExact verifies that the supplied response carries the cookies with the expected names, and no other.
func (*Require) HTTPRStatusEqual ¶
HTTPRStatusEqual verifies that the HTTP status code in the response matches the expected status.
func (*Require) HTTPRSuccess ¶
HTTPRSuccess verifies that the HTTP status code in the response is OK (200).
type Suite ¶
Suite contains extensions to the testify Suite package.
func (*Suite) AfterTest ¶
func (ts *Suite) AfterTest()
AfterTest poisons the test name, as a safety operation.
func (*Suite) BeforeTest ¶
BeforeTest sets up the name of the current test to enable the TestName function.