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

import (
	"sync"

	"github.com/weaveworks/eksctl/pkg/executor"
)

type FakeExecutor struct {
	ExecStub        func(string, ...string) error
	execMutex       sync.RWMutex
	execArgsForCall []struct {
		arg1 string
		arg2 []string
	}
	execReturns struct {
		result1 error
	}
	execReturnsOnCall map[int]struct {
		result1 error
	}
	ExecInDirStub        func(string, string, ...string) error
	execInDirMutex       sync.RWMutex
	execInDirArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 []string
	}
	execInDirReturns struct {
		result1 error
	}
	execInDirReturnsOnCall map[int]struct {
		result1 error
	}
	ExecWithOutStub        func(string, ...string) ([]byte, error)
	execWithOutMutex       sync.RWMutex
	execWithOutArgsForCall []struct {
		arg1 string
		arg2 []string
	}
	execWithOutReturns struct {
		result1 []byte
		result2 error
	}
	execWithOutReturnsOnCall map[int]struct {
		result1 []byte
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeExecutor) Exec(arg1 string, arg2 ...string) error {
	fake.execMutex.Lock()
	ret, specificReturn := fake.execReturnsOnCall[len(fake.execArgsForCall)]
	fake.execArgsForCall = append(fake.execArgsForCall, struct {
		arg1 string
		arg2 []string
	}{arg1, arg2})
	stub := fake.ExecStub
	fakeReturns := fake.execReturns
	fake.recordInvocation("Exec", []interface{}{arg1, arg2})
	fake.execMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2...)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeExecutor) ExecCallCount() int {
	fake.execMutex.RLock()
	defer fake.execMutex.RUnlock()
	return len(fake.execArgsForCall)
}

func (fake *FakeExecutor) ExecCalls(stub func(string, ...string) error) {
	fake.execMutex.Lock()
	defer fake.execMutex.Unlock()
	fake.ExecStub = stub
}

func (fake *FakeExecutor) ExecArgsForCall(i int) (string, []string) {
	fake.execMutex.RLock()
	defer fake.execMutex.RUnlock()
	argsForCall := fake.execArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeExecutor) ExecReturns(result1 error) {
	fake.execMutex.Lock()
	defer fake.execMutex.Unlock()
	fake.ExecStub = nil
	fake.execReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeExecutor) ExecReturnsOnCall(i int, result1 error) {
	fake.execMutex.Lock()
	defer fake.execMutex.Unlock()
	fake.ExecStub = nil
	if fake.execReturnsOnCall == nil {
		fake.execReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.execReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeExecutor) ExecInDir(arg1 string, arg2 string, arg3 ...string) error {
	fake.execInDirMutex.Lock()
	ret, specificReturn := fake.execInDirReturnsOnCall[len(fake.execInDirArgsForCall)]
	fake.execInDirArgsForCall = append(fake.execInDirArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 []string
	}{arg1, arg2, arg3})
	stub := fake.ExecInDirStub
	fakeReturns := fake.execInDirReturns
	fake.recordInvocation("ExecInDir", []interface{}{arg1, arg2, arg3})
	fake.execInDirMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3...)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeExecutor) ExecInDirCallCount() int {
	fake.execInDirMutex.RLock()
	defer fake.execInDirMutex.RUnlock()
	return len(fake.execInDirArgsForCall)
}

func (fake *FakeExecutor) ExecInDirCalls(stub func(string, string, ...string) error) {
	fake.execInDirMutex.Lock()
	defer fake.execInDirMutex.Unlock()
	fake.ExecInDirStub = stub
}

func (fake *FakeExecutor) ExecInDirArgsForCall(i int) (string, string, []string) {
	fake.execInDirMutex.RLock()
	defer fake.execInDirMutex.RUnlock()
	argsForCall := fake.execInDirArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeExecutor) ExecInDirReturns(result1 error) {
	fake.execInDirMutex.Lock()
	defer fake.execInDirMutex.Unlock()
	fake.ExecInDirStub = nil
	fake.execInDirReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeExecutor) ExecInDirReturnsOnCall(i int, result1 error) {
	fake.execInDirMutex.Lock()
	defer fake.execInDirMutex.Unlock()
	fake.ExecInDirStub = nil
	if fake.execInDirReturnsOnCall == nil {
		fake.execInDirReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.execInDirReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeExecutor) ExecWithOut(arg1 string, arg2 ...string) ([]byte, error) {
	fake.execWithOutMutex.Lock()
	ret, specificReturn := fake.execWithOutReturnsOnCall[len(fake.execWithOutArgsForCall)]
	fake.execWithOutArgsForCall = append(fake.execWithOutArgsForCall, struct {
		arg1 string
		arg2 []string
	}{arg1, arg2})
	stub := fake.ExecWithOutStub
	fakeReturns := fake.execWithOutReturns
	fake.recordInvocation("ExecWithOut", []interface{}{arg1, arg2})
	fake.execWithOutMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeExecutor) ExecWithOutCallCount() int {
	fake.execWithOutMutex.RLock()
	defer fake.execWithOutMutex.RUnlock()
	return len(fake.execWithOutArgsForCall)
}

func (fake *FakeExecutor) ExecWithOutCalls(stub func(string, ...string) ([]byte, error)) {
	fake.execWithOutMutex.Lock()
	defer fake.execWithOutMutex.Unlock()
	fake.ExecWithOutStub = stub
}

func (fake *FakeExecutor) ExecWithOutArgsForCall(i int) (string, []string) {
	fake.execWithOutMutex.RLock()
	defer fake.execWithOutMutex.RUnlock()
	argsForCall := fake.execWithOutArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeExecutor) ExecWithOutReturns(result1 []byte, result2 error) {
	fake.execWithOutMutex.Lock()
	defer fake.execWithOutMutex.Unlock()
	fake.ExecWithOutStub = nil
	fake.execWithOutReturns = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeExecutor) ExecWithOutReturnsOnCall(i int, result1 []byte, result2 error) {
	fake.execWithOutMutex.Lock()
	defer fake.execWithOutMutex.Unlock()
	fake.ExecWithOutStub = nil
	if fake.execWithOutReturnsOnCall == nil {
		fake.execWithOutReturnsOnCall = make(map[int]struct {
			result1 []byte
			result2 error
		})
	}
	fake.execWithOutReturnsOnCall[i] = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

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

func (fake *FakeExecutor) 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 _ executor.Executor = new(FakeExecutor)
