forked from cloudfoundry/gorouter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_sleeper.go
42 lines (35 loc) · 888 Bytes
/
fake_sleeper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// This file was generated by counterfeiter
package fakes
import (
"sync"
"time"
"github.com/cloudfoundry/storeadapter"
)
type FakeSleeper struct {
SleepStub func(time.Duration)
sleepMutex sync.RWMutex
sleepArgsForCall []struct {
arg1 time.Duration
}
}
func (fake *FakeSleeper) Sleep(arg1 time.Duration) {
fake.sleepMutex.Lock()
fake.sleepArgsForCall = append(fake.sleepArgsForCall, struct {
arg1 time.Duration
}{arg1})
fake.sleepMutex.Unlock()
if fake.SleepStub != nil {
fake.SleepStub(arg1)
}
}
func (fake *FakeSleeper) SleepCallCount() int {
fake.sleepMutex.RLock()
defer fake.sleepMutex.RUnlock()
return len(fake.sleepArgsForCall)
}
func (fake *FakeSleeper) SleepArgsForCall(i int) time.Duration {
fake.sleepMutex.RLock()
defer fake.sleepMutex.RUnlock()
return fake.sleepArgsForCall[i].arg1
}
var _ storeadapter.Sleeper = new(FakeSleeper)