testhelper

package
v0.0.0-...-1a29aff Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Returner

type Returner struct {
	// contains filtered or unexported fields
}

Returner implements interactor and allows a test to determine the inputs and outputs of an edit

func NewReturner

func NewReturner() *Returner

NewReturner returns an instance of Returner with input and output

func (*Returner) Display

func (r *Returner) Display(a ...interface{})

Display adds a string to the printOut buffer

func (*Returner) Displayf

func (r *Returner) Displayf(c string, a ...interface{})

Displayf adds a formatted string to the printOut buffer

func (*Returner) Displayln

func (r *Returner) Displayln(a ...interface{})

Displayln adds a string plus newline to the printOut buffer

func (*Returner) Edit

func (r *Returner) Edit(og []byte) ([]byte, error)

Edit checks that input matches expected and returns output

func (*Returner) Location

func (r *Returner) Location() *time.Location

Location returns the stored loc

func (*Returner) Read

func (r *Returner) Read() (string, error)

Read returns the stored readStr

func (*Returner) ReadPassword

func (r *Returner) ReadPassword() (string, error)

ReadPassword returns the stored readPwd

func (*Returner) SetEdits

func (r *Returner) SetEdits(i, o []byte)

SetEdits sets the editIn and editOut values on the returner

func (*Returner) SetLoc

func (r *Returner) SetLoc(l *time.Location)

SetLoc sets the loc value on the returner

func (*Returner) SetLocation

func (r *Returner) SetLocation(l *time.Location)

SetLocation sets the location

func (*Returner) SetReads

func (r *Returner) SetReads(s, p string)

SetReads sets the readStr and readPwd values on the returner

func (*Returner) Wait

func (r *Returner) Wait() error

Wait implements interactor, but does nothing

Jump to

Keyboard shortcuts

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