github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/cf/api/apifakes/fake_routing_api_repository.go (about)

     1  // This file was generated by counterfeiter
     2  package apifakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/cf/api"
     8  	"code.cloudfoundry.org/cli/cf/models"
     9  )
    10  
    11  type FakeRoutingAPIRepository struct {
    12  	ListRouterGroupsStub        func(cb func(models.RouterGroup) bool) (apiErr error)
    13  	listRouterGroupsMutex       sync.RWMutex
    14  	listRouterGroupsArgsForCall []struct {
    15  		cb func(models.RouterGroup) bool
    16  	}
    17  	listRouterGroupsReturns struct {
    18  		result1 error
    19  	}
    20  }
    21  
    22  func (fake *FakeRoutingAPIRepository) ListRouterGroups(cb func(models.RouterGroup) bool) (apiErr error) {
    23  	fake.listRouterGroupsMutex.Lock()
    24  	fake.listRouterGroupsArgsForCall = append(fake.listRouterGroupsArgsForCall, struct {
    25  		cb func(models.RouterGroup) bool
    26  	}{cb})
    27  	fake.listRouterGroupsMutex.Unlock()
    28  	if fake.ListRouterGroupsStub != nil {
    29  		return fake.ListRouterGroupsStub(cb)
    30  	} else {
    31  		return fake.listRouterGroupsReturns.result1
    32  	}
    33  }
    34  
    35  func (fake *FakeRoutingAPIRepository) ListRouterGroupsCallCount() int {
    36  	fake.listRouterGroupsMutex.RLock()
    37  	defer fake.listRouterGroupsMutex.RUnlock()
    38  	return len(fake.listRouterGroupsArgsForCall)
    39  }
    40  
    41  func (fake *FakeRoutingAPIRepository) ListRouterGroupsArgsForCall(i int) func(models.RouterGroup) bool {
    42  	fake.listRouterGroupsMutex.RLock()
    43  	defer fake.listRouterGroupsMutex.RUnlock()
    44  	return fake.listRouterGroupsArgsForCall[i].cb
    45  }
    46  
    47  func (fake *FakeRoutingAPIRepository) ListRouterGroupsReturns(result1 error) {
    48  	fake.ListRouterGroupsStub = nil
    49  	fake.listRouterGroupsReturns = struct {
    50  		result1 error
    51  	}{result1}
    52  }
    53  
    54  var _ api.RoutingAPIRepository = new(FakeRoutingAPIRepository)