test

package
v0.0.0-...-fb7eeee Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, s suite.TestingSuite)

Execute the given TestingSuite

Types

type Router

type Router mux.Router

func NewRouter

func NewRouter() *Router

func (*Router) Delete

func (router *Router) Delete(path string, handler http.HandlerFunc) *Router

func (*Router) Get

func (router *Router) Get(path string, handler http.HandlerFunc) *Router

func (*Router) Method

func (router *Router) Method(method, path string, handler http.HandlerFunc) *Router

func (*Router) Patch

func (router *Router) Patch(path string, handler http.HandlerFunc) *Router

func (*Router) Post

func (router *Router) Post(path string, handler http.HandlerFunc) *Router

func (*Router) Put

func (router *Router) Put(path string, handler http.HandlerFunc) *Router

type Suite

type Suite struct {
	suite.Suite
	Server *httptest.Server
	Data   *embed.FS
}

func (*Suite) FileResponseHandler

func (suite *Suite) FileResponseHandler(filename string) http.HandlerFunc

func (*Suite) Initialize

func (suite *Suite) Initialize(router *Router)

func (*Suite) Parameters

func (suite *Suite) Parameters(request *http.Request) map[string]string

func (*Suite) Render

func (suite *Suite) Render(writer io.Writer, path string, data interface{})

func (*Suite) Skip

func (suite *Suite) Skip()

func (*Suite) TearDownSuite

func (suite *Suite) TearDownSuite()

func (*Suite) Template

func (suite *Suite) Template(patterns ...string) *template.Template

Jump to

Keyboard shortcuts

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