forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_plugin_repo.go
57 lines (49 loc) · 1.6 KB
/
fake_plugin_repo.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 pluginrepofakes
import (
"sync"
clipr "github.com/cloudfoundry-incubator/cli-plugin-repo/models"
"github.com/cloudfoundry/cli/cf/actors/pluginrepo"
"github.com/cloudfoundry/cli/cf/models"
)
type FakePluginRepo struct {
GetPluginsStub func([]models.PluginRepo) (map[string][]clipr.Plugin, []string)
getPluginsMutex sync.RWMutex
getPluginsArgsForCall []struct {
arg1 []models.PluginRepo
}
getPluginsReturns struct {
result1 map[string][]clipr.Plugin
result2 []string
}
}
func (fake *FakePluginRepo) GetPlugins(arg1 []models.PluginRepo) (map[string][]clipr.Plugin, []string) {
fake.getPluginsMutex.Lock()
fake.getPluginsArgsForCall = append(fake.getPluginsArgsForCall, struct {
arg1 []models.PluginRepo
}{arg1})
fake.getPluginsMutex.Unlock()
if fake.GetPluginsStub != nil {
return fake.GetPluginsStub(arg1)
} else {
return fake.getPluginsReturns.result1, fake.getPluginsReturns.result2
}
}
func (fake *FakePluginRepo) GetPluginsCallCount() int {
fake.getPluginsMutex.RLock()
defer fake.getPluginsMutex.RUnlock()
return len(fake.getPluginsArgsForCall)
}
func (fake *FakePluginRepo) GetPluginsArgsForCall(i int) []models.PluginRepo {
fake.getPluginsMutex.RLock()
defer fake.getPluginsMutex.RUnlock()
return fake.getPluginsArgsForCall[i].arg1
}
func (fake *FakePluginRepo) GetPluginsReturns(result1 map[string][]clipr.Plugin, result2 []string) {
fake.GetPluginsStub = nil
fake.getPluginsReturns = struct {
result1 map[string][]clipr.Plugin
result2 []string
}{result1, result2}
}
var _ pluginrepo.PluginRepo = new(FakePluginRepo)