spiderwebtest

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GivenRequest

func GivenRequest(httpMethod string, path string) *requestTestCase

GivenRequest starts a request test case to be provided to TestRequest.

func TestEndpoint

func TestEndpoint(t *testing.T, input endpoint.Handler, expected endpoint.Handler, expectedHttpStatus int, expectedError error)

TestEndpoint for business logic.

func TestRequest

func TestRequest(t *testing.T, server *spiderweb.Server, testCase *responseTestCase)

TestRequest for request/response roundtrip.

Types

type Mocker added in v0.0.3

type Mocker interface {
	AssertExpectations(t mock.TestingT) bool
}

Jump to

Keyboard shortcuts

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