testHelper

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponseHeaders

func CheckResponseHeaders(t *testing.T, responseHeaders http.Header, expectedHeadersList []TestHeader, allowExtraHeaders bool)

func CheckResponseStatusCode

func CheckResponseStatusCode(t *testing.T, respStatus int, expectedStatus int)

func CheckResponseStatusRange

func CheckResponseStatusRange(t *testing.T, respStatus int, expectedLowerLimit int, expectedUpperLimit int)

func IsSameAsFile

func IsSameAsFile(test *testing.T, expectedFileURL string, responseFileBytes []byte)

func IsSameInputBytes

func IsSameInputBytes(test *testing.T, expectedBytes []byte, receivedBytes []byte)

func KeysAndValuesBodyMatcher

func KeysAndValuesBodyMatcher(test *testing.T, expectedBody string, responseObject any, checkArrayCount, checkArrayOrder bool)

func KeysBodyMatcher

func KeysBodyMatcher(test *testing.T, expectedBody string, responseObject any, checkArrayCount, checkArrayOrder bool)

func NativeBodyMatcher

func NativeBodyMatcher(test *testing.T, expectedBody string, responseObject any)

func RawBodyMatcher

func RawBodyMatcher(test *testing.T, expectedBody string, responseObject any)

func SliceToCommaSeparatedString

func SliceToCommaSeparatedString(slice interface{}) string

Types

type TestHeader

type TestHeader struct {
	CheckValue bool   `json:"CheckValue"`
	Name       string `json:"Name"`
	Value      string `json:"Value"`
}

func NewTestHeader

func NewTestHeader(checkValue bool, name, value string) TestHeader

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL