testutil

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertJSONEquals

func AssertJSONEquals(t *testing.T, m1 map[string]interface{}, m2 map[string]interface{})

func FixtureBasePath

func FixtureBasePath() string

func FixturePath

func FixturePath(req *http.Request) (int, string, error)

func Keys

func Keys() (string, string)

func LogObj

func LogObj(t *testing.T, obj interface{})

func Main

func Main(m *testing.M)

func Require

func Require(t *testing.T, env string)

Types

type FixturesTransport

type FixturesTransport struct {
	// contains filtered or unexported fields
}

func NewFixturesTransport

func NewFixturesTransport() (*FixturesTransport, error)

func (*FixturesTransport) RoundTrip

func (transport *FixturesTransport) RoundTrip(req *http.Request) (*http.Response, error)

type RecorderTransport

type RecorderTransport struct {
	// contains filtered or unexported fields
}

func NewRecorderTransport

func NewRecorderTransport() (*RecorderTransport, error)

func (*RecorderTransport) RoundTrip

func (transport *RecorderTransport) RoundTrip(req *http.Request) (*http.Response, error)

type TestClient

type TestClient struct {
	*testing.T
	*omise.Client
}

func NewFixedClient

func NewFixedClient(t *testing.T) *TestClient

func NewTestClient

func NewTestClient(t *testing.T) *TestClient

func (*TestClient) MustDo

func (tc *TestClient) MustDo(result interface{}, op internal.Operation)

Jump to

Keyboard shortcuts

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