github.com/cloudfoundry-attic/cli-with-i18n@v6.32.1-0.20171002233121-7401370d3b85+incompatible/api/uaa/uaafakes/fake_uaaendpoint_store.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package uaafakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/api/uaa"
     8  )
     9  
    10  type FakeUAAEndpointStore struct {
    11  	SetUAAEndpointStub        func(uaaEndpoint string)
    12  	setUAAEndpointMutex       sync.RWMutex
    13  	setUAAEndpointArgsForCall []struct {
    14  		uaaEndpoint string
    15  	}
    16  	invocations      map[string][][]interface{}
    17  	invocationsMutex sync.RWMutex
    18  }
    19  
    20  func (fake *FakeUAAEndpointStore) SetUAAEndpoint(uaaEndpoint string) {
    21  	fake.setUAAEndpointMutex.Lock()
    22  	fake.setUAAEndpointArgsForCall = append(fake.setUAAEndpointArgsForCall, struct {
    23  		uaaEndpoint string
    24  	}{uaaEndpoint})
    25  	fake.recordInvocation("SetUAAEndpoint", []interface{}{uaaEndpoint})
    26  	fake.setUAAEndpointMutex.Unlock()
    27  	if fake.SetUAAEndpointStub != nil {
    28  		fake.SetUAAEndpointStub(uaaEndpoint)
    29  	}
    30  }
    31  
    32  func (fake *FakeUAAEndpointStore) SetUAAEndpointCallCount() int {
    33  	fake.setUAAEndpointMutex.RLock()
    34  	defer fake.setUAAEndpointMutex.RUnlock()
    35  	return len(fake.setUAAEndpointArgsForCall)
    36  }
    37  
    38  func (fake *FakeUAAEndpointStore) SetUAAEndpointArgsForCall(i int) string {
    39  	fake.setUAAEndpointMutex.RLock()
    40  	defer fake.setUAAEndpointMutex.RUnlock()
    41  	return fake.setUAAEndpointArgsForCall[i].uaaEndpoint
    42  }
    43  
    44  func (fake *FakeUAAEndpointStore) Invocations() map[string][][]interface{} {
    45  	fake.invocationsMutex.RLock()
    46  	defer fake.invocationsMutex.RUnlock()
    47  	fake.setUAAEndpointMutex.RLock()
    48  	defer fake.setUAAEndpointMutex.RUnlock()
    49  	copiedInvocations := map[string][][]interface{}{}
    50  	for key, value := range fake.invocations {
    51  		copiedInvocations[key] = value
    52  	}
    53  	return copiedInvocations
    54  }
    55  
    56  func (fake *FakeUAAEndpointStore) recordInvocation(key string, args []interface{}) {
    57  	fake.invocationsMutex.Lock()
    58  	defer fake.invocationsMutex.Unlock()
    59  	if fake.invocations == nil {
    60  		fake.invocations = map[string][][]interface{}{}
    61  	}
    62  	if fake.invocations[key] == nil {
    63  		fake.invocations[key] = [][]interface{}{}
    64  	}
    65  	fake.invocations[key] = append(fake.invocations[key], args)
    66  }
    67  
    68  var _ uaa.UAAEndpointStore = new(FakeUAAEndpointStore)