forked from cloudfoundry/bosh-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_fingerprinter.go
57 lines (49 loc) · 1.47 KB
/
fake_fingerprinter.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
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/release/resource"
)
type FakeFingerprinter struct {
CalculateStub func([]resource.File, []string) (string, error)
calculateMutex sync.RWMutex
calculateArgsForCall []struct {
arg1 []resource.File
arg2 []string
}
calculateReturns struct {
result1 string
result2 error
}
}
func (fake *FakeFingerprinter) Calculate(arg1 []resource.File, arg2 []string) (string, error) {
fake.calculateMutex.Lock()
fake.calculateArgsForCall = append(fake.calculateArgsForCall, struct {
arg1 []resource.File
arg2 []string
}{arg1, arg2})
fake.calculateMutex.Unlock()
if fake.CalculateStub != nil {
return fake.CalculateStub(arg1, arg2)
} else {
return fake.calculateReturns.result1, fake.calculateReturns.result2
}
}
func (fake *FakeFingerprinter) CalculateCallCount() int {
fake.calculateMutex.RLock()
defer fake.calculateMutex.RUnlock()
return len(fake.calculateArgsForCall)
}
func (fake *FakeFingerprinter) CalculateArgsForCall(i int) ([]resource.File, []string) {
fake.calculateMutex.RLock()
defer fake.calculateMutex.RUnlock()
return fake.calculateArgsForCall[i].arg1, fake.calculateArgsForCall[i].arg2
}
func (fake *FakeFingerprinter) CalculateReturns(result1 string, result2 error) {
fake.CalculateStub = nil
fake.calculateReturns = struct {
result1 string
result2 error
}{result1, result2}
}
var _ resource.Fingerprinter = new(FakeFingerprinter)