// This file was generated by counterfeiter
package fakes

import (
	"sync"
)

type PushCLIAdapter struct {
	PushStub        func(name, directory, manifestFile string) error
	pushMutex       sync.RWMutex
	pushArgsForCall []struct {
		name         string
		directory    string
		manifestFile string
	}
	pushReturns struct {
		result1 error
	}
	pushReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *PushCLIAdapter) Push(name string, directory string, manifestFile string) error {
	fake.pushMutex.Lock()
	ret, specificReturn := fake.pushReturnsOnCall[len(fake.pushArgsForCall)]
	fake.pushArgsForCall = append(fake.pushArgsForCall, struct {
		name         string
		directory    string
		manifestFile string
	}{name, directory, manifestFile})
	fake.recordInvocation("Push", []interface{}{name, directory, manifestFile})
	fake.pushMutex.Unlock()
	if fake.PushStub != nil {
		return fake.PushStub(name, directory, manifestFile)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.pushReturns.result1
}

func (fake *PushCLIAdapter) PushCallCount() int {
	fake.pushMutex.RLock()
	defer fake.pushMutex.RUnlock()
	return len(fake.pushArgsForCall)
}

func (fake *PushCLIAdapter) PushArgsForCall(i int) (string, string, string) {
	fake.pushMutex.RLock()
	defer fake.pushMutex.RUnlock()
	return fake.pushArgsForCall[i].name, fake.pushArgsForCall[i].directory, fake.pushArgsForCall[i].manifestFile
}

func (fake *PushCLIAdapter) PushReturns(result1 error) {
	fake.PushStub = nil
	fake.pushReturns = struct {
		result1 error
	}{result1}
}

func (fake *PushCLIAdapter) PushReturnsOnCall(i int, result1 error) {
	fake.PushStub = nil
	if fake.pushReturnsOnCall == nil {
		fake.pushReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.pushReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *PushCLIAdapter) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.pushMutex.RLock()
	defer fake.pushMutex.RUnlock()
	return fake.invocations
}

func (fake *PushCLIAdapter) 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)
}
