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 ¶
AssertRequestEqual asserts that the expectations match the actual error
func AssertLogText ¶
func AssertRequestEqual ¶
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 ¶
type RequestExpectation ¶
type RequestExpectation struct { IsNilRequestExpected bool ExpectedURL StringExpectation ExpectedMethod StringExpectation ExpectedHeaders []KeyValueStr ExpectedBody StringExpectation }
RequestExpectation contains expectation info for a http request
type StringExpectation ¶
StringExpectation defines string assertion rule, if IsActive is false expectation is disabled
func NewStringExpectation ¶
func NewStringExpectation(value string) StringExpectation
NewStringExpectation creates active expectation
Click to show internal directories.
Click to hide internal directories.