-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_sha1checksum.go
113 lines (99 loc) · 2.91 KB
/
fake_sha1checksum.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// This file was generated by counterfeiter
package utilsfakes
import (
"sync"
"github.com/cloudfoundry/cli/utils"
)
type FakeSha1Checksum struct {
ComputeFileSha1Stub func() ([]byte, error)
computeFileSha1Mutex sync.RWMutex
computeFileSha1ArgsForCall []struct{}
computeFileSha1Returns struct {
result1 []byte
result2 error
}
CheckSha1Stub func(string) bool
checkSha1Mutex sync.RWMutex
checkSha1ArgsForCall []struct {
arg1 string
}
checkSha1Returns struct {
result1 bool
}
SetFilePathStub func(string)
setFilePathMutex sync.RWMutex
setFilePathArgsForCall []struct {
arg1 string
}
}
func (fake *FakeSha1Checksum) ComputeFileSha1() ([]byte, error) {
fake.computeFileSha1Mutex.Lock()
fake.computeFileSha1ArgsForCall = append(fake.computeFileSha1ArgsForCall, struct{}{})
fake.computeFileSha1Mutex.Unlock()
if fake.ComputeFileSha1Stub != nil {
return fake.ComputeFileSha1Stub()
} else {
return fake.computeFileSha1Returns.result1, fake.computeFileSha1Returns.result2
}
}
func (fake *FakeSha1Checksum) ComputeFileSha1CallCount() int {
fake.computeFileSha1Mutex.RLock()
defer fake.computeFileSha1Mutex.RUnlock()
return len(fake.computeFileSha1ArgsForCall)
}
func (fake *FakeSha1Checksum) ComputeFileSha1Returns(result1 []byte, result2 error) {
fake.ComputeFileSha1Stub = nil
fake.computeFileSha1Returns = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *FakeSha1Checksum) CheckSha1(arg1 string) bool {
fake.checkSha1Mutex.Lock()
fake.checkSha1ArgsForCall = append(fake.checkSha1ArgsForCall, struct {
arg1 string
}{arg1})
fake.checkSha1Mutex.Unlock()
if fake.CheckSha1Stub != nil {
return fake.CheckSha1Stub(arg1)
} else {
return fake.checkSha1Returns.result1
}
}
func (fake *FakeSha1Checksum) CheckSha1CallCount() int {
fake.checkSha1Mutex.RLock()
defer fake.checkSha1Mutex.RUnlock()
return len(fake.checkSha1ArgsForCall)
}
func (fake *FakeSha1Checksum) CheckSha1ArgsForCall(i int) string {
fake.checkSha1Mutex.RLock()
defer fake.checkSha1Mutex.RUnlock()
return fake.checkSha1ArgsForCall[i].arg1
}
func (fake *FakeSha1Checksum) CheckSha1Returns(result1 bool) {
fake.CheckSha1Stub = nil
fake.checkSha1Returns = struct {
result1 bool
}{result1}
}
func (fake *FakeSha1Checksum) SetFilePath(arg1 string) {
fake.setFilePathMutex.Lock()
fake.setFilePathArgsForCall = append(fake.setFilePathArgsForCall, struct {
arg1 string
}{arg1})
fake.setFilePathMutex.Unlock()
if fake.SetFilePathStub != nil {
fake.SetFilePathStub(arg1)
}
}
func (fake *FakeSha1Checksum) SetFilePathCallCount() int {
fake.setFilePathMutex.RLock()
defer fake.setFilePathMutex.RUnlock()
return len(fake.setFilePathArgsForCall)
}
func (fake *FakeSha1Checksum) SetFilePathArgsForCall(i int) string {
fake.setFilePathMutex.RLock()
defer fake.setFilePathMutex.RUnlock()
return fake.setFilePathArgsForCall[i].arg1
}
var _ utils.Sha1Checksum = new(FakeSha1Checksum)