Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions expect.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ type baseMock interface {
MatchExpectationsInOrder(b bool)

ExpectDo(args ...interface{}) *ExpectedCmd
ExpectIntSliceDo(args ...interface{}) *ExpectedIntSlice
ExpectIntDo(args ...interface{}) *ExpectedInt
ExpectStringSliceDo(args ...interface{}) *ExpectedStringSlice
ExpectStringDo(args ...interface{}) *ExpectedString
ExpectCommand() *ExpectedCommandsInfo
ExpectClientGetName() *ExpectedString
ExpectEcho(message interface{}) *ExpectedString
Expand Down
27 changes: 27 additions & 0 deletions mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,34 @@ func (m *mock) ExpectDo(args ...interface{}) *ExpectedCmd {
default:
panic("ExpectDo: unsupported client type")
}
m.pushExpect(e)
return e
}

func (m *mock) ExpectIntSliceDo(args ...interface{}) *ExpectedIntSlice {
e := &ExpectedIntSlice{}
e.cmd = redis.NewIntSliceCmd(m.ctx, args...)
m.pushExpect(e)
return e
}

func (m *mock) ExpectIntDo(args ...interface{}) *ExpectedInt {
e := &ExpectedInt{}
e.cmd = redis.NewIntCmd(m.ctx, args...)
m.pushExpect(e)
return e
}

func (m *mock) ExpectStringDo(args ...interface{}) *ExpectedString {
e := &ExpectedString{}
e.cmd = redis.NewStringCmd(m.ctx, args...)
m.pushExpect(e)
return e
}

func (m *mock) ExpectStringSliceDo(args ...interface{}) *ExpectedStringSlice {
e := &ExpectedStringSlice{}
e.cmd = redis.NewStringSliceCmd(m.ctx, args...)
m.pushExpect(e)
return e
}
Expand Down