Documentation
¶
Overview ¶
ユニットテスト支援ユーティリティのパッケージ。
Index ¶
- func GetBaseDir() string
- type AddrStub
- type Capturer
- type ConnStub
- func (c *ConnStub) Close() error
- func (c *ConnStub) LocalAddr() net.Addr
- func (c *ConnStub) Read(b []byte) (n int, err error)
- func (c *ConnStub) RemoteAddr() net.Addr
- func (c *ConnStub) SetDeadline(t time.Time) error
- func (c *ConnStub) SetReadDeadline(t time.Time) error
- func (c *ConnStub) SetWriteDeadline(t time.Time) error
- func (c *ConnStub) Write(b []byte) (n int, err error)
- type ListenerStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseDir ¶
func GetBaseDir() string
Types ¶
type AddrStub ¶
type AddrStub struct {
// contains filtered or unexported fields
}
net.Addrのスタブ構造体
func NewAddrStub ¶
type Capturer ¶
type Capturer struct {
// contains filtered or unexported fields
}
標準出力・標準エラー出力のキャプチャを行う構造体
func NewStderrCapturer ¶
func NewStderrCapturer() *Capturer
標準エラー出力をキャプチャするCapturerを生成する。
return : 生成したCapturerオブジェクト
func NewStdoutCapturer ¶
func NewStdoutCapturer() *Capturer
標準出力をキャプチャするCapturerを生成する。
return : 生成したCapturerオブジェクト
type ConnStub ¶
type ConnStub struct {
ReadStr string // Read関数で取得させる文字列
WriteStr string // Write関数で書き込まれた文字列
ReadErr error
WriteErr error
CloseErr error
SetDeadlineErr error
SetReadDeadlineErr error
SetWriteDeadlineErr error
IsClosed bool
// contains filtered or unexported fields
}
net.Connのスタブ構造体
func NewConnStub ¶
func NewConnStub() *ConnStub
func (*ConnStub) RemoteAddr ¶
type ListenerStub ¶
type ListenerStub struct {
AcceptErr error
CloseErr error
IsClosed bool
// contains filtered or unexported fields
}
net.Listenerのスタブ構造体
func NewListenerStub ¶
func NewListenerStub() *ListenerStub
func (*ListenerStub) Addr ¶
func (l *ListenerStub) Addr() net.Addr
func (*ListenerStub) Close ¶
func (l *ListenerStub) Close() error
Click to show internal directories.
Click to hide internal directories.