njsontest

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendJSON

func AppendJSON(x interface{}, options ...Option) func(t *testing.T)

AppendJSON check a value implementing njson.Appender interface.

func Unmarshal

func Unmarshal(x interface{}, options ...Option) func(t *testing.T)

Unmarshal is a test case for an njson.Unmarshaler

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is a test case option.

func Error

func Error(err interface{}) Option

Error sets an error to expect

func JSON

func JSON(x interface{}) Option

JSON sets JSON data for the test case.

func Method

func Method(methodName string) Option

Method sets a custom method name for the test case.

func Value

func Value(x interface{}) Option

type T

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

T is a test case for njson.

Jump to

Keyboard shortcuts

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