tests

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(req *http.Request, err error) *http.Request

func ReadRequestFromFile

func ReadRequestFromFile(filename string) (*http.Request, []byte, error)

func ReadResponseFromFile

func ReadResponseFromFile(filename string, req *http.Request) (*http.Response, []byte, error)

Types

type Manifest

type Manifest struct {
	JsonTestData []struct {
		Data string `json:"data"`
	} `json:"jsonTestData"`
	SchemaTestData []struct {
		Schema string `json:"schema"`
		Data   string `json:"data"`
	} `json:"schemaTestData"`
	WireProtocolTestData []WireProtocolTestData `json:"wireProtocolTestData"`
}

func ReadManifest

func ReadManifest() *Manifest

type Operation

type Operation struct {
	Name          string
	RestLiMethod  protocol.RestLiMethod
	Finder        *string
	Action        *string
	Request       *http.Request
	RequestBytes  []byte
	Response      *http.Response
	ResponseBytes []byte
	Status        int
}

func (*Operation) TestMethodName

func (o *Operation) TestMethodName() string

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

type WireProtocolTestData

type WireProtocolTestData struct {
	Name        string
	PackagePath string
	Operations  []Operation
}

func (*WireProtocolTestData) UnmarshalJSON

func (d *WireProtocolTestData) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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