godog

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 15 Imported by: 0

README

Utilities for creating http requests

For an example of usage see example_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseFeature

type BaseFeature struct {
	StartedAt time.Time
	Response  response
	Request   Request

	GetValue func(key string) (value string, err error)
	// contains filtered or unexported fields
}

func (*BaseFeature) AssertDataLength

func (api *BaseFeature) AssertDataLength(expected string) error

func (*BaseFeature) AssertEquals added in v0.2.1

func (api *BaseFeature) AssertEquals(actual, expected string) (err error)

func (*BaseFeature) AssertErrorIs

func (api *BaseFeature) AssertErrorIs(errorMessage string, code int) (err error)

func (*BaseFeature) AssertNotEmpty

func (api *BaseFeature) AssertNotEmpty(responseKey string) error

func (*BaseFeature) AssertResponseBodyErrorMessageIs

func (api *BaseFeature) AssertResponseBodyErrorMessageIs(errorMessage string) (err error)

func (*BaseFeature) AssertResponseBodyValueEquals

func (api *BaseFeature) AssertResponseBodyValueEquals(key, expected string) (err error)

func (*BaseFeature) AssertResponseCode

func (api *BaseFeature) AssertResponseCode(code int) (err error)

func (*BaseFeature) CreatePathRequest

func (api *BaseFeature) CreatePathRequest(method, path string) error

func (*BaseFeature) ExecuteInvalidRequest

func (api *BaseFeature) ExecuteInvalidRequest() error

func (*BaseFeature) ExecuteInvalidRequestWithContext added in v0.0.8

func (api *BaseFeature) ExecuteInvalidRequestWithContext(ctx context.Context) error

func (*BaseFeature) ExecuteTheRequest

func (api *BaseFeature) ExecuteTheRequest() error

func (*BaseFeature) ExecuteTheRequestWithContext added in v0.0.8

func (api *BaseFeature) ExecuteTheRequestWithContext(ctx context.Context) (err error)

func (*BaseFeature) ExecuteTheRequestWithPayload

func (api *BaseFeature) ExecuteTheRequestWithPayload(payload []byte) error

func (*BaseFeature) ExecuteTheRequestWithPayloadAndContext added in v0.0.8

func (api *BaseFeature) ExecuteTheRequestWithPayloadAndContext(ctx context.Context, payload []byte) (err error)

func (*BaseFeature) SetBaseUrl

func (api *BaseFeature) SetBaseUrl(baseUrl string)

func (*BaseFeature) SetRequestBodyParameterTo

func (api *BaseFeature) SetRequestBodyParameterTo(key, value string) (err error)

func (*BaseFeature) SetRequestBodyStringListParameterTo

func (api *BaseFeature) SetRequestBodyStringListParameterTo(key, valuesstr string) (err error)

func (*BaseFeature) SetRequestHeaderParameterTo

func (api *BaseFeature) SetRequestHeaderParameterTo(key, value string) (err error)

func (*BaseFeature) SetsRequestPathParameterTo

func (api *BaseFeature) SetsRequestPathParameterTo(key, value string) (err error)

type Request

type Request struct {
	Url           string
	Body          map[string]interface{}
	Headers       http.Header
	Method        string
	ExecutionTime time.Time
}

func (*Request) String added in v0.2.1

func (r *Request) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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