// Code generated by counterfeiter. DO NOT EDIT.
package applicationfakes

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/commands/application"
	"code.cloudfoundry.org/cli/cf/models"
)

type FakeDisplayer struct {
	ShowAppStub        func(models.Application, string, string) error
	showAppMutex       sync.RWMutex
	showAppArgsForCall []struct {
		arg1 models.Application
		arg2 string
		arg3 string
	}
	showAppReturns struct {
		result1 error
	}
	showAppReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDisplayer) ShowApp(arg1 models.Application, arg2 string, arg3 string) error {
	fake.showAppMutex.Lock()
	ret, specificReturn := fake.showAppReturnsOnCall[len(fake.showAppArgsForCall)]
	fake.showAppArgsForCall = append(fake.showAppArgsForCall, struct {
		arg1 models.Application
		arg2 string
		arg3 string
	}{arg1, arg2, arg3})
	fake.recordInvocation("ShowApp", []interface{}{arg1, arg2, arg3})
	fake.showAppMutex.Unlock()
	if fake.ShowAppStub != nil {
		return fake.ShowAppStub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.showAppReturns
	return fakeReturns.result1
}

func (fake *FakeDisplayer) ShowAppCallCount() int {
	fake.showAppMutex.RLock()
	defer fake.showAppMutex.RUnlock()
	return len(fake.showAppArgsForCall)
}

func (fake *FakeDisplayer) ShowAppCalls(stub func(models.Application, string, string) error) {
	fake.showAppMutex.Lock()
	defer fake.showAppMutex.Unlock()
	fake.ShowAppStub = stub
}

func (fake *FakeDisplayer) ShowAppArgsForCall(i int) (models.Application, string, string) {
	fake.showAppMutex.RLock()
	defer fake.showAppMutex.RUnlock()
	argsForCall := fake.showAppArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeDisplayer) ShowAppReturns(result1 error) {
	fake.showAppMutex.Lock()
	defer fake.showAppMutex.Unlock()
	fake.ShowAppStub = nil
	fake.showAppReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeDisplayer) ShowAppReturnsOnCall(i int, result1 error) {
	fake.showAppMutex.Lock()
	defer fake.showAppMutex.Unlock()
	fake.ShowAppStub = nil
	if fake.showAppReturnsOnCall == nil {
		fake.showAppReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.showAppReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeDisplayer) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.showAppMutex.RLock()
	defer fake.showAppMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeDisplayer) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ application.Displayer = new(FakeDisplayer)
