// Code generated by counterfeiter. DO NOT EDIT. package mocks import ( "sync" "time" ) type TimeAfter struct { AfterStub func(time.Duration) <-chan time.Time afterMutex sync.RWMutex afterArgsForCall []struct { arg1 time.Duration } afterReturns struct { result1 <-chan time.Time } afterReturnsOnCall map[int]struct { result1 <-chan time.Time } invocations map[string][][]interface{} invocationsMutex sync.RWMutex } func (fake *TimeAfter) After(arg1 time.Duration) <-chan time.Time { fake.afterMutex.Lock() ret, specificReturn := fake.afterReturnsOnCall[len(fake.afterArgsForCall)] fake.afterArgsForCall = append(fake.afterArgsForCall, struct { arg1 time.Duration }{arg1}) stub := fake.AfterStub fakeReturns := fake.afterReturns fake.recordInvocation("After", []interface{}{arg1}) fake.afterMutex.Unlock() if stub != nil { return stub(arg1) } if specificReturn { return ret.result1 } return fakeReturns.result1 } func (fake *TimeAfter) AfterCallCount() int { fake.afterMutex.RLock() defer fake.afterMutex.RUnlock() return len(fake.afterArgsForCall) } func (fake *TimeAfter) AfterCalls(stub func(time.Duration) <-chan time.Time) { fake.afterMutex.Lock() defer fake.afterMutex.Unlock() fake.AfterStub = stub } func (fake *TimeAfter) AfterArgsForCall(i int) time.Duration { fake.afterMutex.RLock() defer fake.afterMutex.RUnlock() argsForCall := fake.afterArgsForCall[i] return argsForCall.arg1 } func (fake *TimeAfter) AfterReturns(result1 <-chan time.Time) { fake.afterMutex.Lock() defer fake.afterMutex.Unlock() fake.AfterStub = nil fake.afterReturns = struct { result1 <-chan time.Time }{result1} } func (fake *TimeAfter) AfterReturnsOnCall(i int, result1 <-chan time.Time) { fake.afterMutex.Lock() defer fake.afterMutex.Unlock() fake.AfterStub = nil if fake.afterReturnsOnCall == nil { fake.afterReturnsOnCall = make(map[int]struct { result1 <-chan time.Time }) } fake.afterReturnsOnCall[i] = struct { result1 <-chan time.Time }{result1} } func (fake *TimeAfter) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() fake.afterMutex.RLock() defer fake.afterMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value } return copiedInvocations } func (fake *TimeAfter) 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) }