requireutil

package
v1.0.0-...-4f7f1ef Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorUnsupportedJSONType1 = errutil.NewFactory("unsupported json type: %T")
)

errors

Functions

func RequireJSONFieldEqual

func RequireJSONFieldEqual(t *testing.T, expected interface{}, jsonobj interface{}, field string, msgAndArgs ...interface{})

RequireJSONFieldEqual field of jsonobj should equal to expected

func RequireJSONFieldEqualValues

func RequireJSONFieldEqualValues(t *testing.T, expected interface{}, jsonobj interface{}, field string, msgAndArgs ...interface{})

RequireJSONFieldEqualValues the value of field of jsonobj should equal to expected

func RequireJSONFieldExist

func RequireJSONFieldExist(t *testing.T, jsonobj interface{}, field string, msgAndArgs ...interface{})

RequireJSONFieldExist field of jsonobj should be exist

func RequireJSONFieldNil

func RequireJSONFieldNil(t *testing.T, jsonobj interface{}, field string, msgAndArgs ...interface{})

RequireJSONFieldNil field of jsonobj should be nil

func RequireJSONFieldNotEqual

func RequireJSONFieldNotEqual(t *testing.T, expected interface{}, jsonobj interface{}, field string, msgAndArgs ...interface{})

RequireJSONFieldNotEqual field of jsonobj should not equal to expected

func RequireJSONFieldNotExist

func RequireJSONFieldNotExist(t *testing.T, jsonobj interface{}, field string, msgAndArgs ...interface{})

RequireJSONFieldNotExist field of jsonobj should not be exist

func RequireJSONFieldNotNil

func RequireJSONFieldNotNil(t *testing.T, jsonobj interface{}, field string, msgAndArgs ...interface{})

RequireJSONFieldNotNil field of jsonobj should not be nil

func RequireText

func RequireText(t *testing.T, expected string, actual string)

RequireText if expected != actual, show error of diff detail

func UnmarshalJSONMap

func UnmarshalJSONMap(jsonobj interface{}) (jsonmap map[string]interface{}, err error)

UnmarshalJSONMap unmarshal jsonobj to map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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