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

import (
	sync "sync"

	install "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install"
)

type FakeStrategyInstaller struct {
	CheckInstalledStub        func(install.Strategy) (bool, error)
	checkInstalledMutex       sync.RWMutex
	checkInstalledArgsForCall []struct {
		arg1 install.Strategy
	}
	checkInstalledReturns struct {
		result1 bool
		result2 error
	}
	checkInstalledReturnsOnCall map[int]struct {
		result1 bool
		result2 error
	}
	InstallStub        func(install.Strategy) error
	installMutex       sync.RWMutex
	installArgsForCall []struct {
		arg1 install.Strategy
	}
	installReturns struct {
		result1 error
	}
	installReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeStrategyInstaller) CheckInstalled(arg1 install.Strategy) (bool, error) {
	fake.checkInstalledMutex.Lock()
	ret, specificReturn := fake.checkInstalledReturnsOnCall[len(fake.checkInstalledArgsForCall)]
	fake.checkInstalledArgsForCall = append(fake.checkInstalledArgsForCall, struct {
		arg1 install.Strategy
	}{arg1})
	fake.recordInvocation("CheckInstalled", []interface{}{arg1})
	fake.checkInstalledMutex.Unlock()
	if fake.CheckInstalledStub != nil {
		return fake.CheckInstalledStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.checkInstalledReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeStrategyInstaller) CheckInstalledCallCount() int {
	fake.checkInstalledMutex.RLock()
	defer fake.checkInstalledMutex.RUnlock()
	return len(fake.checkInstalledArgsForCall)
}

func (fake *FakeStrategyInstaller) CheckInstalledCalls(stub func(install.Strategy) (bool, error)) {
	fake.checkInstalledMutex.Lock()
	defer fake.checkInstalledMutex.Unlock()
	fake.CheckInstalledStub = stub
}

func (fake *FakeStrategyInstaller) CheckInstalledArgsForCall(i int) install.Strategy {
	fake.checkInstalledMutex.RLock()
	defer fake.checkInstalledMutex.RUnlock()
	argsForCall := fake.checkInstalledArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeStrategyInstaller) CheckInstalledReturns(result1 bool, result2 error) {
	fake.checkInstalledMutex.Lock()
	defer fake.checkInstalledMutex.Unlock()
	fake.CheckInstalledStub = nil
	fake.checkInstalledReturns = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *FakeStrategyInstaller) CheckInstalledReturnsOnCall(i int, result1 bool, result2 error) {
	fake.checkInstalledMutex.Lock()
	defer fake.checkInstalledMutex.Unlock()
	fake.CheckInstalledStub = nil
	if fake.checkInstalledReturnsOnCall == nil {
		fake.checkInstalledReturnsOnCall = make(map[int]struct {
			result1 bool
			result2 error
		})
	}
	fake.checkInstalledReturnsOnCall[i] = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *FakeStrategyInstaller) Install(arg1 install.Strategy) error {
	fake.installMutex.Lock()
	ret, specificReturn := fake.installReturnsOnCall[len(fake.installArgsForCall)]
	fake.installArgsForCall = append(fake.installArgsForCall, struct {
		arg1 install.Strategy
	}{arg1})
	fake.recordInvocation("Install", []interface{}{arg1})
	fake.installMutex.Unlock()
	if fake.InstallStub != nil {
		return fake.InstallStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.installReturns
	return fakeReturns.result1
}

func (fake *FakeStrategyInstaller) InstallCallCount() int {
	fake.installMutex.RLock()
	defer fake.installMutex.RUnlock()
	return len(fake.installArgsForCall)
}

func (fake *FakeStrategyInstaller) InstallCalls(stub func(install.Strategy) error) {
	fake.installMutex.Lock()
	defer fake.installMutex.Unlock()
	fake.InstallStub = stub
}

func (fake *FakeStrategyInstaller) InstallArgsForCall(i int) install.Strategy {
	fake.installMutex.RLock()
	defer fake.installMutex.RUnlock()
	argsForCall := fake.installArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeStrategyInstaller) InstallReturns(result1 error) {
	fake.installMutex.Lock()
	defer fake.installMutex.Unlock()
	fake.InstallStub = nil
	fake.installReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeStrategyInstaller) InstallReturnsOnCall(i int, result1 error) {
	fake.installMutex.Lock()
	defer fake.installMutex.Unlock()
	fake.InstallStub = nil
	if fake.installReturnsOnCall == nil {
		fake.installReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.installReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeStrategyInstaller) 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 _ install.StrategyInstaller = new(FakeStrategyInstaller)
