testutils

package
v0.0.0-...-f1e4607 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(tb testing.TB, condition bool, msg string, v ...interface{})

Assert fails the test if the condition is false.

func EncodeParams

func EncodeParams(params string) string

EncodeParams encodes the url query parameters

func Equals

func Equals(tb testing.TB, exp, act interface{})

Equals fails the test if exp is not equal to act.

func Ok

func Ok(tb testing.TB, err error)

Ok fails the test if an err is not nil.

func RemoveSpaceAndLine

func RemoveSpaceAndLine(content string) string

RemoveSpaceAndLine removes all white spaces and lines

Types

type Mocker

type Mocker interface {
	MockRESTfulAPI() error
}

type TestConfig

type TestConfig struct {
	DbDrive      string
	DbConnection string
	Controller   reflect.Type
	Model        interface{}
	Action       string
	Actual       interface{}
	URL          string
	Body         interface{}
}

func (*TestConfig) MockRESTfulAPI

func (config *TestConfig) MockRESTfulAPI() (int, error)

Jump to

Keyboard shortcuts

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