2021-03-02 16:14:02 +00:00
|
|
|
// Code generated by counterfeiter. DO NOT EDIT.
|
|
|
|
package mockdb
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"sync"
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
"github.com/ssb-ngi-pointer/go-ssb-room/roomdb"
|
2021-03-02 16:14:02 +00:00
|
|
|
refs "go.mindeco.de/ssb-refs"
|
|
|
|
)
|
|
|
|
|
|
|
|
type FakeInviteService struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
ConsumeStub func(context.Context, string, refs.FeedRef) (roomdb.Invite, error)
|
2021-03-02 16:14:02 +00:00
|
|
|
consumeMutex sync.RWMutex
|
|
|
|
consumeArgsForCall []struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 string
|
|
|
|
arg3 refs.FeedRef
|
|
|
|
}
|
|
|
|
consumeReturns struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}
|
|
|
|
consumeReturnsOnCall map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}
|
|
|
|
CreateStub func(context.Context, int64, string) (string, error)
|
|
|
|
createMutex sync.RWMutex
|
|
|
|
createArgsForCall []struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 int64
|
|
|
|
arg3 string
|
|
|
|
}
|
|
|
|
createReturns struct {
|
|
|
|
result1 string
|
|
|
|
result2 error
|
|
|
|
}
|
|
|
|
createReturnsOnCall map[int]struct {
|
|
|
|
result1 string
|
|
|
|
result2 error
|
|
|
|
}
|
2021-03-10 15:44:46 +00:00
|
|
|
GetByIDStub func(context.Context, int64) (roomdb.Invite, error)
|
2021-03-05 09:46:59 +00:00
|
|
|
getByIDMutex sync.RWMutex
|
|
|
|
getByIDArgsForCall []struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 int64
|
|
|
|
}
|
|
|
|
getByIDReturns struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}
|
|
|
|
getByIDReturnsOnCall map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}
|
2021-03-10 15:44:46 +00:00
|
|
|
GetByTokenStub func(context.Context, string) (roomdb.Invite, error)
|
2021-03-05 09:46:59 +00:00
|
|
|
getByTokenMutex sync.RWMutex
|
|
|
|
getByTokenArgsForCall []struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 string
|
|
|
|
}
|
|
|
|
getByTokenReturns struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}
|
|
|
|
getByTokenReturnsOnCall map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}
|
2021-03-10 15:44:46 +00:00
|
|
|
ListStub func(context.Context) ([]roomdb.Invite, error)
|
2021-03-02 16:14:02 +00:00
|
|
|
listMutex sync.RWMutex
|
|
|
|
listArgsForCall []struct {
|
|
|
|
arg1 context.Context
|
|
|
|
}
|
|
|
|
listReturns struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 []roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}
|
|
|
|
listReturnsOnCall map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 []roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}
|
|
|
|
RevokeStub func(context.Context, int64) error
|
|
|
|
revokeMutex sync.RWMutex
|
|
|
|
revokeArgsForCall []struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 int64
|
|
|
|
}
|
|
|
|
revokeReturns struct {
|
|
|
|
result1 error
|
|
|
|
}
|
|
|
|
revokeReturnsOnCall map[int]struct {
|
|
|
|
result1 error
|
|
|
|
}
|
|
|
|
invocations map[string][][]interface{}
|
|
|
|
invocationsMutex sync.RWMutex
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) Consume(arg1 context.Context, arg2 string, arg3 refs.FeedRef) (roomdb.Invite, error) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.consumeMutex.Lock()
|
|
|
|
ret, specificReturn := fake.consumeReturnsOnCall[len(fake.consumeArgsForCall)]
|
|
|
|
fake.consumeArgsForCall = append(fake.consumeArgsForCall, struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 string
|
|
|
|
arg3 refs.FeedRef
|
|
|
|
}{arg1, arg2, arg3})
|
|
|
|
stub := fake.ConsumeStub
|
|
|
|
fakeReturns := fake.consumeReturns
|
|
|
|
fake.recordInvocation("Consume", []interface{}{arg1, arg2, arg3})
|
|
|
|
fake.consumeMutex.Unlock()
|
|
|
|
if stub != nil {
|
|
|
|
return stub(arg1, arg2, arg3)
|
|
|
|
}
|
|
|
|
if specificReturn {
|
|
|
|
return ret.result1, ret.result2
|
|
|
|
}
|
|
|
|
return fakeReturns.result1, fakeReturns.result2
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) ConsumeCallCount() int {
|
|
|
|
fake.consumeMutex.RLock()
|
|
|
|
defer fake.consumeMutex.RUnlock()
|
|
|
|
return len(fake.consumeArgsForCall)
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) ConsumeCalls(stub func(context.Context, string, refs.FeedRef) (roomdb.Invite, error)) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.consumeMutex.Lock()
|
|
|
|
defer fake.consumeMutex.Unlock()
|
|
|
|
fake.ConsumeStub = stub
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) ConsumeArgsForCall(i int) (context.Context, string, refs.FeedRef) {
|
|
|
|
fake.consumeMutex.RLock()
|
|
|
|
defer fake.consumeMutex.RUnlock()
|
|
|
|
argsForCall := fake.consumeArgsForCall[i]
|
|
|
|
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) ConsumeReturns(result1 roomdb.Invite, result2 error) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.consumeMutex.Lock()
|
|
|
|
defer fake.consumeMutex.Unlock()
|
|
|
|
fake.ConsumeStub = nil
|
|
|
|
fake.consumeReturns = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) ConsumeReturnsOnCall(i int, result1 roomdb.Invite, result2 error) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.consumeMutex.Lock()
|
|
|
|
defer fake.consumeMutex.Unlock()
|
|
|
|
fake.ConsumeStub = nil
|
|
|
|
if fake.consumeReturnsOnCall == nil {
|
|
|
|
fake.consumeReturnsOnCall = make(map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
})
|
|
|
|
}
|
|
|
|
fake.consumeReturnsOnCall[i] = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) Create(arg1 context.Context, arg2 int64, arg3 string) (string, error) {
|
|
|
|
fake.createMutex.Lock()
|
|
|
|
ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)]
|
|
|
|
fake.createArgsForCall = append(fake.createArgsForCall, struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 int64
|
|
|
|
arg3 string
|
|
|
|
}{arg1, arg2, arg3})
|
|
|
|
stub := fake.CreateStub
|
|
|
|
fakeReturns := fake.createReturns
|
|
|
|
fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3})
|
|
|
|
fake.createMutex.Unlock()
|
|
|
|
if stub != nil {
|
|
|
|
return stub(arg1, arg2, arg3)
|
|
|
|
}
|
|
|
|
if specificReturn {
|
|
|
|
return ret.result1, ret.result2
|
|
|
|
}
|
|
|
|
return fakeReturns.result1, fakeReturns.result2
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) CreateCallCount() int {
|
|
|
|
fake.createMutex.RLock()
|
|
|
|
defer fake.createMutex.RUnlock()
|
|
|
|
return len(fake.createArgsForCall)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) CreateCalls(stub func(context.Context, int64, string) (string, error)) {
|
|
|
|
fake.createMutex.Lock()
|
|
|
|
defer fake.createMutex.Unlock()
|
|
|
|
fake.CreateStub = stub
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) CreateArgsForCall(i int) (context.Context, int64, string) {
|
|
|
|
fake.createMutex.RLock()
|
|
|
|
defer fake.createMutex.RUnlock()
|
|
|
|
argsForCall := fake.createArgsForCall[i]
|
|
|
|
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) CreateReturns(result1 string, result2 error) {
|
|
|
|
fake.createMutex.Lock()
|
|
|
|
defer fake.createMutex.Unlock()
|
|
|
|
fake.CreateStub = nil
|
|
|
|
fake.createReturns = struct {
|
|
|
|
result1 string
|
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) CreateReturnsOnCall(i int, result1 string, result2 error) {
|
|
|
|
fake.createMutex.Lock()
|
|
|
|
defer fake.createMutex.Unlock()
|
|
|
|
fake.CreateStub = nil
|
|
|
|
if fake.createReturnsOnCall == nil {
|
|
|
|
fake.createReturnsOnCall = make(map[int]struct {
|
|
|
|
result1 string
|
|
|
|
result2 error
|
|
|
|
})
|
|
|
|
}
|
|
|
|
fake.createReturnsOnCall[i] = struct {
|
|
|
|
result1 string
|
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByID(arg1 context.Context, arg2 int64) (roomdb.Invite, error) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByIDMutex.Lock()
|
|
|
|
ret, specificReturn := fake.getByIDReturnsOnCall[len(fake.getByIDArgsForCall)]
|
|
|
|
fake.getByIDArgsForCall = append(fake.getByIDArgsForCall, struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 int64
|
|
|
|
}{arg1, arg2})
|
|
|
|
stub := fake.GetByIDStub
|
|
|
|
fakeReturns := fake.getByIDReturns
|
|
|
|
fake.recordInvocation("GetByID", []interface{}{arg1, arg2})
|
|
|
|
fake.getByIDMutex.Unlock()
|
|
|
|
if stub != nil {
|
|
|
|
return stub(arg1, arg2)
|
|
|
|
}
|
|
|
|
if specificReturn {
|
|
|
|
return ret.result1, ret.result2
|
|
|
|
}
|
|
|
|
return fakeReturns.result1, fakeReturns.result2
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) GetByIDCallCount() int {
|
|
|
|
fake.getByIDMutex.RLock()
|
|
|
|
defer fake.getByIDMutex.RUnlock()
|
|
|
|
return len(fake.getByIDArgsForCall)
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByIDCalls(stub func(context.Context, int64) (roomdb.Invite, error)) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByIDMutex.Lock()
|
|
|
|
defer fake.getByIDMutex.Unlock()
|
|
|
|
fake.GetByIDStub = stub
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) GetByIDArgsForCall(i int) (context.Context, int64) {
|
|
|
|
fake.getByIDMutex.RLock()
|
|
|
|
defer fake.getByIDMutex.RUnlock()
|
|
|
|
argsForCall := fake.getByIDArgsForCall[i]
|
|
|
|
return argsForCall.arg1, argsForCall.arg2
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByIDReturns(result1 roomdb.Invite, result2 error) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByIDMutex.Lock()
|
|
|
|
defer fake.getByIDMutex.Unlock()
|
|
|
|
fake.GetByIDStub = nil
|
|
|
|
fake.getByIDReturns = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByIDReturnsOnCall(i int, result1 roomdb.Invite, result2 error) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByIDMutex.Lock()
|
|
|
|
defer fake.getByIDMutex.Unlock()
|
|
|
|
fake.GetByIDStub = nil
|
|
|
|
if fake.getByIDReturnsOnCall == nil {
|
|
|
|
fake.getByIDReturnsOnCall = make(map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
})
|
|
|
|
}
|
|
|
|
fake.getByIDReturnsOnCall[i] = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByToken(arg1 context.Context, arg2 string) (roomdb.Invite, error) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByTokenMutex.Lock()
|
|
|
|
ret, specificReturn := fake.getByTokenReturnsOnCall[len(fake.getByTokenArgsForCall)]
|
|
|
|
fake.getByTokenArgsForCall = append(fake.getByTokenArgsForCall, struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 string
|
|
|
|
}{arg1, arg2})
|
|
|
|
stub := fake.GetByTokenStub
|
|
|
|
fakeReturns := fake.getByTokenReturns
|
|
|
|
fake.recordInvocation("GetByToken", []interface{}{arg1, arg2})
|
|
|
|
fake.getByTokenMutex.Unlock()
|
|
|
|
if stub != nil {
|
|
|
|
return stub(arg1, arg2)
|
|
|
|
}
|
|
|
|
if specificReturn {
|
|
|
|
return ret.result1, ret.result2
|
|
|
|
}
|
|
|
|
return fakeReturns.result1, fakeReturns.result2
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) GetByTokenCallCount() int {
|
|
|
|
fake.getByTokenMutex.RLock()
|
|
|
|
defer fake.getByTokenMutex.RUnlock()
|
|
|
|
return len(fake.getByTokenArgsForCall)
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByTokenCalls(stub func(context.Context, string) (roomdb.Invite, error)) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByTokenMutex.Lock()
|
|
|
|
defer fake.getByTokenMutex.Unlock()
|
|
|
|
fake.GetByTokenStub = stub
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) GetByTokenArgsForCall(i int) (context.Context, string) {
|
|
|
|
fake.getByTokenMutex.RLock()
|
|
|
|
defer fake.getByTokenMutex.RUnlock()
|
|
|
|
argsForCall := fake.getByTokenArgsForCall[i]
|
|
|
|
return argsForCall.arg1, argsForCall.arg2
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByTokenReturns(result1 roomdb.Invite, result2 error) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByTokenMutex.Lock()
|
|
|
|
defer fake.getByTokenMutex.Unlock()
|
|
|
|
fake.GetByTokenStub = nil
|
|
|
|
fake.getByTokenReturns = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) GetByTokenReturnsOnCall(i int, result1 roomdb.Invite, result2 error) {
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByTokenMutex.Lock()
|
|
|
|
defer fake.getByTokenMutex.Unlock()
|
|
|
|
fake.GetByTokenStub = nil
|
|
|
|
if fake.getByTokenReturnsOnCall == nil {
|
|
|
|
fake.getByTokenReturnsOnCall = make(map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
})
|
|
|
|
}
|
|
|
|
fake.getByTokenReturnsOnCall[i] = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 roomdb.Invite
|
2021-03-05 09:46:59 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) List(arg1 context.Context) ([]roomdb.Invite, error) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.listMutex.Lock()
|
|
|
|
ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)]
|
|
|
|
fake.listArgsForCall = append(fake.listArgsForCall, struct {
|
|
|
|
arg1 context.Context
|
|
|
|
}{arg1})
|
|
|
|
stub := fake.ListStub
|
|
|
|
fakeReturns := fake.listReturns
|
|
|
|
fake.recordInvocation("List", []interface{}{arg1})
|
|
|
|
fake.listMutex.Unlock()
|
|
|
|
if stub != nil {
|
|
|
|
return stub(arg1)
|
|
|
|
}
|
|
|
|
if specificReturn {
|
|
|
|
return ret.result1, ret.result2
|
|
|
|
}
|
|
|
|
return fakeReturns.result1, fakeReturns.result2
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) ListCallCount() int {
|
|
|
|
fake.listMutex.RLock()
|
|
|
|
defer fake.listMutex.RUnlock()
|
|
|
|
return len(fake.listArgsForCall)
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) ListCalls(stub func(context.Context) ([]roomdb.Invite, error)) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.listMutex.Lock()
|
|
|
|
defer fake.listMutex.Unlock()
|
|
|
|
fake.ListStub = stub
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) ListArgsForCall(i int) context.Context {
|
|
|
|
fake.listMutex.RLock()
|
|
|
|
defer fake.listMutex.RUnlock()
|
|
|
|
argsForCall := fake.listArgsForCall[i]
|
|
|
|
return argsForCall.arg1
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) ListReturns(result1 []roomdb.Invite, result2 error) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.listMutex.Lock()
|
|
|
|
defer fake.listMutex.Unlock()
|
|
|
|
fake.ListStub = nil
|
|
|
|
fake.listReturns = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 []roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
func (fake *FakeInviteService) ListReturnsOnCall(i int, result1 []roomdb.Invite, result2 error) {
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.listMutex.Lock()
|
|
|
|
defer fake.listMutex.Unlock()
|
|
|
|
fake.ListStub = nil
|
|
|
|
if fake.listReturnsOnCall == nil {
|
|
|
|
fake.listReturnsOnCall = make(map[int]struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 []roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
})
|
|
|
|
}
|
|
|
|
fake.listReturnsOnCall[i] = struct {
|
2021-03-10 15:44:46 +00:00
|
|
|
result1 []roomdb.Invite
|
2021-03-02 16:14:02 +00:00
|
|
|
result2 error
|
|
|
|
}{result1, result2}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) Revoke(arg1 context.Context, arg2 int64) error {
|
|
|
|
fake.revokeMutex.Lock()
|
|
|
|
ret, specificReturn := fake.revokeReturnsOnCall[len(fake.revokeArgsForCall)]
|
|
|
|
fake.revokeArgsForCall = append(fake.revokeArgsForCall, struct {
|
|
|
|
arg1 context.Context
|
|
|
|
arg2 int64
|
|
|
|
}{arg1, arg2})
|
|
|
|
stub := fake.RevokeStub
|
|
|
|
fakeReturns := fake.revokeReturns
|
|
|
|
fake.recordInvocation("Revoke", []interface{}{arg1, arg2})
|
|
|
|
fake.revokeMutex.Unlock()
|
|
|
|
if stub != nil {
|
|
|
|
return stub(arg1, arg2)
|
|
|
|
}
|
|
|
|
if specificReturn {
|
|
|
|
return ret.result1
|
|
|
|
}
|
|
|
|
return fakeReturns.result1
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) RevokeCallCount() int {
|
|
|
|
fake.revokeMutex.RLock()
|
|
|
|
defer fake.revokeMutex.RUnlock()
|
|
|
|
return len(fake.revokeArgsForCall)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) RevokeCalls(stub func(context.Context, int64) error) {
|
|
|
|
fake.revokeMutex.Lock()
|
|
|
|
defer fake.revokeMutex.Unlock()
|
|
|
|
fake.RevokeStub = stub
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) RevokeArgsForCall(i int) (context.Context, int64) {
|
|
|
|
fake.revokeMutex.RLock()
|
|
|
|
defer fake.revokeMutex.RUnlock()
|
|
|
|
argsForCall := fake.revokeArgsForCall[i]
|
|
|
|
return argsForCall.arg1, argsForCall.arg2
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) RevokeReturns(result1 error) {
|
|
|
|
fake.revokeMutex.Lock()
|
|
|
|
defer fake.revokeMutex.Unlock()
|
|
|
|
fake.RevokeStub = nil
|
|
|
|
fake.revokeReturns = struct {
|
|
|
|
result1 error
|
|
|
|
}{result1}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) RevokeReturnsOnCall(i int, result1 error) {
|
|
|
|
fake.revokeMutex.Lock()
|
|
|
|
defer fake.revokeMutex.Unlock()
|
|
|
|
fake.RevokeStub = nil
|
|
|
|
if fake.revokeReturnsOnCall == nil {
|
|
|
|
fake.revokeReturnsOnCall = make(map[int]struct {
|
|
|
|
result1 error
|
|
|
|
})
|
|
|
|
}
|
|
|
|
fake.revokeReturnsOnCall[i] = struct {
|
|
|
|
result1 error
|
|
|
|
}{result1}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) Invocations() map[string][][]interface{} {
|
|
|
|
fake.invocationsMutex.RLock()
|
|
|
|
defer fake.invocationsMutex.RUnlock()
|
|
|
|
fake.consumeMutex.RLock()
|
|
|
|
defer fake.consumeMutex.RUnlock()
|
|
|
|
fake.createMutex.RLock()
|
|
|
|
defer fake.createMutex.RUnlock()
|
2021-03-05 09:46:59 +00:00
|
|
|
fake.getByIDMutex.RLock()
|
|
|
|
defer fake.getByIDMutex.RUnlock()
|
|
|
|
fake.getByTokenMutex.RLock()
|
|
|
|
defer fake.getByTokenMutex.RUnlock()
|
2021-03-02 16:14:02 +00:00
|
|
|
fake.listMutex.RLock()
|
|
|
|
defer fake.listMutex.RUnlock()
|
|
|
|
fake.revokeMutex.RLock()
|
|
|
|
defer fake.revokeMutex.RUnlock()
|
|
|
|
copiedInvocations := map[string][][]interface{}{}
|
|
|
|
for key, value := range fake.invocations {
|
|
|
|
copiedInvocations[key] = value
|
|
|
|
}
|
|
|
|
return copiedInvocations
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fake *FakeInviteService) recordInvocation(key string, args []interface{}) {
|
|
|
|
fake.invocationsMutex.Lock()
|
|
|
|
defer fake.invocationsMutex.Unlock()
|
|
|
|
if fake.invocations == nil {
|
|
|
|
fake.invocations = map[string][][]interface{}{}
|
|
|
|
}
|
|
|
|
if fake.invocations[key] == nil {
|
|
|
|
fake.invocations[key] = [][]interface{}{}
|
|
|
|
}
|
|
|
|
fake.invocations[key] = append(fake.invocations[key], args)
|
|
|
|
}
|
|
|
|
|
2021-03-10 15:44:46 +00:00
|
|
|
var _ roomdb.InviteService = new(FakeInviteService)
|