forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_buildpack_bits_repository.go
56 lines (48 loc) · 1.65 KB
/
fake_buildpack_bits_repository.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
// This file was generated by counterfeiter
package apifakes
import (
"sync"
"github.com/cloudfoundry/cli/cf/api"
"github.com/cloudfoundry/cli/cf/models"
)
type FakeBuildpackBitsRepository struct {
UploadBuildpackStub func(buildpack models.Buildpack, dir string) (apiErr error)
uploadBuildpackMutex sync.RWMutex
uploadBuildpackArgsForCall []struct {
buildpack models.Buildpack
dir string
}
uploadBuildpackReturns struct {
result1 error
}
}
func (fake *FakeBuildpackBitsRepository) UploadBuildpack(buildpack models.Buildpack, dir string) (apiErr error) {
fake.uploadBuildpackMutex.Lock()
fake.uploadBuildpackArgsForCall = append(fake.uploadBuildpackArgsForCall, struct {
buildpack models.Buildpack
dir string
}{buildpack, dir})
fake.uploadBuildpackMutex.Unlock()
if fake.UploadBuildpackStub != nil {
return fake.UploadBuildpackStub(buildpack, dir)
} else {
return fake.uploadBuildpackReturns.result1
}
}
func (fake *FakeBuildpackBitsRepository) UploadBuildpackCallCount() int {
fake.uploadBuildpackMutex.RLock()
defer fake.uploadBuildpackMutex.RUnlock()
return len(fake.uploadBuildpackArgsForCall)
}
func (fake *FakeBuildpackBitsRepository) UploadBuildpackArgsForCall(i int) (models.Buildpack, string) {
fake.uploadBuildpackMutex.RLock()
defer fake.uploadBuildpackMutex.RUnlock()
return fake.uploadBuildpackArgsForCall[i].buildpack, fake.uploadBuildpackArgsForCall[i].dir
}
func (fake *FakeBuildpackBitsRepository) UploadBuildpackReturns(result1 error) {
fake.UploadBuildpackStub = nil
fake.uploadBuildpackReturns = struct {
result1 error
}{result1}
}
var _ api.BuildpackBitsRepository = new(FakeBuildpackBitsRepository)