Documentation
¶
Overview ¶
Package testutility is a package for capturing output for testing.
Index ¶
Constants ¶
View Source
const (
// TEST_OUTPUT_STDOUT is a constant for stdout
TEST_OUTPUT_ANY = "ANY"
)
Variables ¶
This section is empty.
Functions ¶
func RemoveTabAndSpaceAndLf ¶
RemoveTabAndSpaceAndLf removes tab, space, and line feed
func ReplaceDoubleSlashToSingleSlash ¶
ReplaceDoubleSlashToSingleSlash replaces double slash to single slash
Types ¶
type Capturable ¶
Capturable is an interface for capturing output.
type Capturer ¶
type Capturer struct {
OutBuffer bufferproxy.Buffer
ErrBuffer bufferproxy.Buffer
OsProxy osproxy.Os
}
Capturer is a struct for capturing output.
func NewCapturer ¶
func NewCapturer( outBuffer bufferproxy.Buffer, errBuffer bufferproxy.Buffer, osProxy osproxy.Os, ) *Capturer
NewCapturer is a constructor for Capturer.
type JrpChecker ¶
type JrpChecker struct {
FmtProxy fmtproxy.Fmt
SortProxy sortproxy.Sort
SqlProxy sqlproxy.Sql
StrconvProxy strconvproxy.Strconv
StringsProxy stringsproxy.Strings
}
JrpChecker is a struct for checking Jrp.
func NewJrpChecker ¶
func NewJrpChecker( fmtProxy fmtproxy.Fmt, sortProxy sortproxy.Sort, sqlProxy sqlproxy.Sql, strconvProxy strconvproxy.Strconv, stringsProxy stringsproxy.Strings, ) *JrpChecker
NewJrpChecker is a constructor for JrpChecker.
func (*JrpChecker) GetJrpSeq ¶
func (j *JrpChecker) GetJrpSeq(jrpDBFilePath string) (int, error)
GetJrpSeq returns the sequence of jrp.
func (*JrpChecker) IsExist ¶
func (j *JrpChecker) IsExist(jrpDBFilePath string, id int) (bool, error)
IsExist checks if jrp exists.
func (*JrpChecker) IsFavorited ¶
func (j *JrpChecker) IsFavorited(jrpDBFilePath string, id int) (bool, error)
IsFavorited checks if jrp is favorited.
func (*JrpChecker) IsSameJrps ¶
func (j *JrpChecker) IsSameJrps(got, want []*model.Jrp) bool
IsSameJrps checks if jrps are the same.
type JrpCheckerInterface ¶
type JrpCheckerInterface interface {
GetJrpSeq(jrpDBFilePath string) (int, error)
IsExist(jrpDBFilePath string, id int) (bool, error)
IsFavorited(jrpDBFilePath string, id int) (bool, error)
IsSameJrps(got, want []*model.Jrp) bool
}
JrpCheckerInterface is an interface for checking Jrp.
Click to show internal directories.
Click to hide internal directories.