testutils

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFailWriter

func CreateFailWriter(writeLimit int) io.WriteCloser

CreateFailWriter returns a io.WriteCloser that returns an error after the amount of writes indicated by writeLimit

func TestConfigGetEnumsCount

func TestConfigGetEnumsCount(config types.ServiceConfig, expectedCount int)

TestConfigGetEnumsCount tests whether the config.Enums returns the expected amount of items

func TestConfigGetFieldsCount

func TestConfigGetFieldsCount(config types.ServiceConfig, expectedCount int)

TestConfigGetFieldsCount tests whether the config.QueryFields return the expected amount of fields

func TestConfigGetInvalidQueryValue

func TestConfigGetInvalidQueryValue(config types.ServiceConfig)

TestConfigGetInvalidQueryValue tests whether the config returns an error when an invalid query value is requested

func TestConfigSetInvalidQueryValue

func TestConfigSetInvalidQueryValue(config types.ServiceConfig, rawInvalidURL string)

TestConfigSetInvalidQueryValue tests whether the config returns an error when a URL with an invalid query value is parsed

Types

type Eavesdropper

type Eavesdropper interface {
	GetConversation(includeGreeting bool) string
}

Eavesdropper is an interface that provides a way to get a summarized output of a connection RX and TX

func CreateTextConFaker

func CreateTextConFaker(responses []string, delim string) (*textproto.Conn, Eavesdropper)

CreateTextConFaker returns a textproto.Conn to fake textproto based connections

Jump to

Keyboard shortcuts

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