代码拉取完成,页面将自动刷新
// Code generated by counterfeiter. DO NOT EDIT.
package mock
import (
sync "sync"
)
type TransactionRegistry struct {
AddStub func(string, string) bool
addMutex sync.RWMutex
addArgsForCall []struct {
arg1 string
arg2 string
}
addReturns struct {
result1 bool
}
addReturnsOnCall map[int]struct {
result1 bool
}
RemoveStub func(string, string)
removeMutex sync.RWMutex
removeArgsForCall []struct {
arg1 string
arg2 string
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *TransactionRegistry) Add(arg1 string, arg2 string) bool {
fake.addMutex.Lock()
ret, specificReturn := fake.addReturnsOnCall[len(fake.addArgsForCall)]
fake.addArgsForCall = append(fake.addArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.recordInvocation("Add", []interface{}{arg1, arg2})
fake.addMutex.Unlock()
if fake.AddStub != nil {
return fake.AddStub(arg1, arg2)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.addReturns
return fakeReturns.result1
}
func (fake *TransactionRegistry) AddCallCount() int {
fake.addMutex.RLock()
defer fake.addMutex.RUnlock()
return len(fake.addArgsForCall)
}
func (fake *TransactionRegistry) AddCalls(stub func(string, string) bool) {
fake.addMutex.Lock()
defer fake.addMutex.Unlock()
fake.AddStub = stub
}
func (fake *TransactionRegistry) AddArgsForCall(i int) (string, string) {
fake.addMutex.RLock()
defer fake.addMutex.RUnlock()
argsForCall := fake.addArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *TransactionRegistry) AddReturns(result1 bool) {
fake.addMutex.Lock()
defer fake.addMutex.Unlock()
fake.AddStub = nil
fake.addReturns = struct {
result1 bool
}{result1}
}
func (fake *TransactionRegistry) AddReturnsOnCall(i int, result1 bool) {
fake.addMutex.Lock()
defer fake.addMutex.Unlock()
fake.AddStub = nil
if fake.addReturnsOnCall == nil {
fake.addReturnsOnCall = make(map[int]struct {
result1 bool
})
}
fake.addReturnsOnCall[i] = struct {
result1 bool
}{result1}
}
func (fake *TransactionRegistry) Remove(arg1 string, arg2 string) {
fake.removeMutex.Lock()
fake.removeArgsForCall = append(fake.removeArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.recordInvocation("Remove", []interface{}{arg1, arg2})
fake.removeMutex.Unlock()
if fake.RemoveStub != nil {
fake.RemoveStub(arg1, arg2)
}
}
func (fake *TransactionRegistry) RemoveCallCount() int {
fake.removeMutex.RLock()
defer fake.removeMutex.RUnlock()
return len(fake.removeArgsForCall)
}
func (fake *TransactionRegistry) RemoveCalls(stub func(string, string)) {
fake.removeMutex.Lock()
defer fake.removeMutex.Unlock()
fake.RemoveStub = stub
}
func (fake *TransactionRegistry) RemoveArgsForCall(i int) (string, string) {
fake.removeMutex.RLock()
defer fake.removeMutex.RUnlock()
argsForCall := fake.removeArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *TransactionRegistry) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.addMutex.RLock()
defer fake.addMutex.RUnlock()
fake.removeMutex.RLock()
defer fake.removeMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *TransactionRegistry) 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)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。