restfultest

package
v0.0.0-...-e59f0fa Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

Container is unit test solution for rest api method

func New

func New(schema interface{}, chain *handler.Chain) (*Container, error)

New create a isolated test container, you can register a struct, and it will be registered to a isolated container

func (*Container) ServeHTTP

func (c *Container) ServeHTTP(resp http.ResponseWriter, req *http.Request)

ServeHTTP accept native httptest, after process, response writer will write response

Jump to

Keyboard shortcuts

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