github.com/rakutentech/cli@v6.12.5-0.20151006231303-24468b65536e+incompatible/cf/actors/plugin_repo/fakes/fake_plugin_repo.go (about)

     1  // This file was generated by counterfeiter
     2  package fakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	clipr "github.com/cloudfoundry-incubator/cli-plugin-repo/models"
     8  	"github.com/cloudfoundry/cli/cf/actors/plugin_repo"
     9  	"github.com/cloudfoundry/cli/cf/models"
    10  )
    11  
    12  type FakePluginRepo struct {
    13  	GetPluginsStub        func([]models.PluginRepo) (map[string][]clipr.Plugin, []string)
    14  	getPluginsMutex       sync.RWMutex
    15  	getPluginsArgsForCall []struct {
    16  		arg1 []models.PluginRepo
    17  	}
    18  	getPluginsReturns struct {
    19  		result1 map[string][]clipr.Plugin
    20  		result2 []string
    21  	}
    22  }
    23  
    24  func (fake *FakePluginRepo) GetPlugins(arg1 []models.PluginRepo) (map[string][]clipr.Plugin, []string) {
    25  	fake.getPluginsMutex.Lock()
    26  	defer fake.getPluginsMutex.Unlock()
    27  	fake.getPluginsArgsForCall = append(fake.getPluginsArgsForCall, struct {
    28  		arg1 []models.PluginRepo
    29  	}{arg1})
    30  	if fake.GetPluginsStub != nil {
    31  		return fake.GetPluginsStub(arg1)
    32  	} else {
    33  		return fake.getPluginsReturns.result1, fake.getPluginsReturns.result2
    34  	}
    35  }
    36  
    37  func (fake *FakePluginRepo) GetPluginsCallCount() int {
    38  	fake.getPluginsMutex.RLock()
    39  	defer fake.getPluginsMutex.RUnlock()
    40  	return len(fake.getPluginsArgsForCall)
    41  }
    42  
    43  func (fake *FakePluginRepo) GetPluginsArgsForCall(i int) []models.PluginRepo {
    44  	fake.getPluginsMutex.RLock()
    45  	defer fake.getPluginsMutex.RUnlock()
    46  	return fake.getPluginsArgsForCall[i].arg1
    47  }
    48  
    49  func (fake *FakePluginRepo) GetPluginsReturns(result1 map[string][]clipr.Plugin, result2 []string) {
    50  	fake.GetPluginsStub = nil
    51  	fake.getPluginsReturns = struct {
    52  		result1 map[string][]clipr.Plugin
    53  		result2 []string
    54  	}{result1, result2}
    55  }
    56  
    57  var _ plugin_repo.PluginRepo = new(FakePluginRepo)