forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_application_staging_watcher.go
62 lines (54 loc) · 2.67 KB
/
fake_application_staging_watcher.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
// This file was generated by counterfeiter
package applicationfakes
import (
"sync"
"github.com/cloudfoundry/cli/cf/commands/application"
"github.com/cloudfoundry/cli/cf/models"
)
type FakeApplicationStagingWatcher struct {
ApplicationWatchStagingStub func(app models.Application, orgName string, spaceName string, startCommand func(app models.Application) (models.Application, error)) (updatedApp models.Application, err error)
applicationWatchStagingMutex sync.RWMutex
applicationWatchStagingArgsForCall []struct {
app models.Application
orgName string
spaceName string
startCommand func(app models.Application) (models.Application, error)
}
applicationWatchStagingReturns struct {
result1 models.Application
result2 error
}
}
func (fake *FakeApplicationStagingWatcher) ApplicationWatchStaging(app models.Application, orgName string, spaceName string, startCommand func(app models.Application) (models.Application, error)) (updatedApp models.Application, err error) {
fake.applicationWatchStagingMutex.Lock()
fake.applicationWatchStagingArgsForCall = append(fake.applicationWatchStagingArgsForCall, struct {
app models.Application
orgName string
spaceName string
startCommand func(app models.Application) (models.Application, error)
}{app, orgName, spaceName, startCommand})
fake.applicationWatchStagingMutex.Unlock()
if fake.ApplicationWatchStagingStub != nil {
return fake.ApplicationWatchStagingStub(app, orgName, spaceName, startCommand)
} else {
return fake.applicationWatchStagingReturns.result1, fake.applicationWatchStagingReturns.result2
}
}
func (fake *FakeApplicationStagingWatcher) ApplicationWatchStagingCallCount() int {
fake.applicationWatchStagingMutex.RLock()
defer fake.applicationWatchStagingMutex.RUnlock()
return len(fake.applicationWatchStagingArgsForCall)
}
func (fake *FakeApplicationStagingWatcher) ApplicationWatchStagingArgsForCall(i int) (models.Application, string, string, func(app models.Application) (models.Application, error)) {
fake.applicationWatchStagingMutex.RLock()
defer fake.applicationWatchStagingMutex.RUnlock()
return fake.applicationWatchStagingArgsForCall[i].app, fake.applicationWatchStagingArgsForCall[i].orgName, fake.applicationWatchStagingArgsForCall[i].spaceName, fake.applicationWatchStagingArgsForCall[i].startCommand
}
func (fake *FakeApplicationStagingWatcher) ApplicationWatchStagingReturns(result1 models.Application, result2 error) {
fake.ApplicationWatchStagingStub = nil
fake.applicationWatchStagingReturns = struct {
result1 models.Application
result2 error
}{result1, result2}
}
var _ application.ApplicationStagingWatcher = new(FakeApplicationStagingWatcher)