Documentation
¶
Index ¶
- func AssertErrorContains(t *testing.T, theError error, msg string)
- func AssertLogText(t *testing.T, expectedText, actualText string)
- func AssertRequestEqual(t *testing.T, re RequestExpectation, actualRequest *http.Request)
- func AssertSyncMapEqual(t *testing.T, expected, actual *sync.Map, msgAndArgs ...interface{}) bool
- func CaptureOutput(f func()) string
- type KeyValueStr
- type RequestExpectation
- type StringExpectation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertErrorContains ¶ added in v1.3.7
AssertRequestEqual asserts that the expectations match the actual error
func AssertLogText ¶
func AssertRequestEqual ¶ added in v1.3.7
func AssertRequestEqual(t *testing.T, re RequestExpectation, actualRequest *http.Request)
AssertRequestEqual asserts that the expectations match the actual request
func AssertSyncMapEqual ¶
func CaptureOutput ¶
func CaptureOutput(f func()) string
Types ¶
type KeyValueStr ¶ added in v1.3.7
type RequestExpectation ¶ added in v1.3.7
type RequestExpectation struct { IsNilRequestExpected bool ExpectedURL StringExpectation ExpectedMethod StringExpectation ExpectedHeaders []KeyValueStr ExpectedBody StringExpectation }
RequestExpectation contains expectation info for a http request
type StringExpectation ¶ added in v1.3.7
StringExpectation defines string assertion rule, if IsActive is false expectation is disabled
func NewStringExpectation ¶ added in v1.3.7
func NewStringExpectation(value string) StringExpectation
NewStringExpectation creates active expectation
Click to show internal directories.
Click to hide internal directories.