atest

package module
v0.0.0-...-c00887f Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2017 License: MIT Imports: 12 Imported by: 0

README

atest

some simple test helpers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Resp *httptest.ResponseRecorder
	Json map[string]interface{}
	Code int
	Body string
}

type Test

type Test struct {
	*testing.T
	// contains filtered or unexported fields
}

func TestWithDir

func TestWithDir(t *testing.T, dir string, skip int) *Test

func Wrap

func Wrap(t *testing.T, skip int) *Test

func (*Test) Assert

func (t *Test) Assert(cond bool)

func (*Test) AssertEqual

func (t *Test) AssertEqual(val1, val2 interface{})

func (*Test) AssertError

func (t *Test) AssertError(err error)

func (*Test) AssertJSONEqual

func (t *Test) AssertJSONEqual(got_str, want_str string)

func (*Test) AssertNil

func (t *Test) AssertNil(obj interface{})

func (*Test) AssertNoError

func (t *Test) AssertNoError(err error)

func (*Test) AssertNotEqual

func (t *Test) AssertNotEqual(val1, val2 interface{})

func (*Test) Close

func (t *Test) Close()

func (*Test) CreateFile

func (t *Test) CreateFile(name string) *os.File

func (*Test) Dir

func (t *Test) Dir() string

func (*Test) PerformRequest

func (t *Test) PerformRequest(server http.Handler, method, endpoint string,
	headers http.Header, json_str string) *Response

Jump to

Keyboard shortcuts

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