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

import (
	"io"
	"sync"

	"code.cloudfoundry.org/cli/util/ui"
)

type FakeResolver struct {
	ResolveStub        func(interface{}) error
	resolveMutex       sync.RWMutex
	resolveArgsForCall []struct {
		arg1 interface{}
	}
	resolveReturns struct {
		result1 error
	}
	resolveReturnsOnCall map[int]struct {
		result1 error
	}
	SetInStub        func(io.Reader)
	setInMutex       sync.RWMutex
	setInArgsForCall []struct {
		arg1 io.Reader
	}
	SetOutStub        func(io.Writer)
	setOutMutex       sync.RWMutex
	setOutArgsForCall []struct {
		arg1 io.Writer
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeResolver) Resolve(arg1 interface{}) error {
	fake.resolveMutex.Lock()
	ret, specificReturn := fake.resolveReturnsOnCall[len(fake.resolveArgsForCall)]
	fake.resolveArgsForCall = append(fake.resolveArgsForCall, struct {
		arg1 interface{}
	}{arg1})
	stub := fake.ResolveStub
	fakeReturns := fake.resolveReturns
	fake.recordInvocation("Resolve", []interface{}{arg1})
	fake.resolveMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeResolver) ResolveCallCount() int {
	fake.resolveMutex.RLock()
	defer fake.resolveMutex.RUnlock()
	return len(fake.resolveArgsForCall)
}

func (fake *FakeResolver) ResolveCalls(stub func(interface{}) error) {
	fake.resolveMutex.Lock()
	defer fake.resolveMutex.Unlock()
	fake.ResolveStub = stub
}

func (fake *FakeResolver) ResolveArgsForCall(i int) interface{} {
	fake.resolveMutex.RLock()
	defer fake.resolveMutex.RUnlock()
	argsForCall := fake.resolveArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeResolver) ResolveReturns(result1 error) {
	fake.resolveMutex.Lock()
	defer fake.resolveMutex.Unlock()
	fake.ResolveStub = nil
	fake.resolveReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeResolver) ResolveReturnsOnCall(i int, result1 error) {
	fake.resolveMutex.Lock()
	defer fake.resolveMutex.Unlock()
	fake.ResolveStub = nil
	if fake.resolveReturnsOnCall == nil {
		fake.resolveReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.resolveReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeResolver) SetIn(arg1 io.Reader) {
	fake.setInMutex.Lock()
	fake.setInArgsForCall = append(fake.setInArgsForCall, struct {
		arg1 io.Reader
	}{arg1})
	stub := fake.SetInStub
	fake.recordInvocation("SetIn", []interface{}{arg1})
	fake.setInMutex.Unlock()
	if stub != nil {
		fake.SetInStub(arg1)
	}
}

func (fake *FakeResolver) SetInCallCount() int {
	fake.setInMutex.RLock()
	defer fake.setInMutex.RUnlock()
	return len(fake.setInArgsForCall)
}

func (fake *FakeResolver) SetInCalls(stub func(io.Reader)) {
	fake.setInMutex.Lock()
	defer fake.setInMutex.Unlock()
	fake.SetInStub = stub
}

func (fake *FakeResolver) SetInArgsForCall(i int) io.Reader {
	fake.setInMutex.RLock()
	defer fake.setInMutex.RUnlock()
	argsForCall := fake.setInArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeResolver) SetOut(arg1 io.Writer) {
	fake.setOutMutex.Lock()
	fake.setOutArgsForCall = append(fake.setOutArgsForCall, struct {
		arg1 io.Writer
	}{arg1})
	stub := fake.SetOutStub
	fake.recordInvocation("SetOut", []interface{}{arg1})
	fake.setOutMutex.Unlock()
	if stub != nil {
		fake.SetOutStub(arg1)
	}
}

func (fake *FakeResolver) SetOutCallCount() int {
	fake.setOutMutex.RLock()
	defer fake.setOutMutex.RUnlock()
	return len(fake.setOutArgsForCall)
}

func (fake *FakeResolver) SetOutCalls(stub func(io.Writer)) {
	fake.setOutMutex.Lock()
	defer fake.setOutMutex.Unlock()
	fake.SetOutStub = stub
}

func (fake *FakeResolver) SetOutArgsForCall(i int) io.Writer {
	fake.setOutMutex.RLock()
	defer fake.setOutMutex.RUnlock()
	argsForCall := fake.setOutArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeResolver) 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 _ ui.Resolver = new(FakeResolver)
