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

import (
	"sync"

	"github.com/conflowio/parsley/parsley"
)

type FakeReader struct {
	IsEOFStub        func(parsley.Pos) bool
	isEOFMutex       sync.RWMutex
	isEOFArgsForCall []struct {
		arg1 parsley.Pos
	}
	isEOFReturns struct {
		result1 bool
	}
	isEOFReturnsOnCall map[int]struct {
		result1 bool
	}
	PosStub        func(int) parsley.Pos
	posMutex       sync.RWMutex
	posArgsForCall []struct {
		arg1 int
	}
	posReturns struct {
		result1 parsley.Pos
	}
	posReturnsOnCall map[int]struct {
		result1 parsley.Pos
	}
	RemainingStub        func(parsley.Pos) int
	remainingMutex       sync.RWMutex
	remainingArgsForCall []struct {
		arg1 parsley.Pos
	}
	remainingReturns struct {
		result1 int
	}
	remainingReturnsOnCall map[int]struct {
		result1 int
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeReader) IsEOF(arg1 parsley.Pos) bool {
	fake.isEOFMutex.Lock()
	ret, specificReturn := fake.isEOFReturnsOnCall[len(fake.isEOFArgsForCall)]
	fake.isEOFArgsForCall = append(fake.isEOFArgsForCall, struct {
		arg1 parsley.Pos
	}{arg1})
	stub := fake.IsEOFStub
	fakeReturns := fake.isEOFReturns
	fake.recordInvocation("IsEOF", []interface{}{arg1})
	fake.isEOFMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeReader) IsEOFCallCount() int {
	fake.isEOFMutex.RLock()
	defer fake.isEOFMutex.RUnlock()
	return len(fake.isEOFArgsForCall)
}

func (fake *FakeReader) IsEOFCalls(stub func(parsley.Pos) bool) {
	fake.isEOFMutex.Lock()
	defer fake.isEOFMutex.Unlock()
	fake.IsEOFStub = stub
}

func (fake *FakeReader) IsEOFArgsForCall(i int) parsley.Pos {
	fake.isEOFMutex.RLock()
	defer fake.isEOFMutex.RUnlock()
	argsForCall := fake.isEOFArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeReader) IsEOFReturns(result1 bool) {
	fake.isEOFMutex.Lock()
	defer fake.isEOFMutex.Unlock()
	fake.IsEOFStub = nil
	fake.isEOFReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeReader) IsEOFReturnsOnCall(i int, result1 bool) {
	fake.isEOFMutex.Lock()
	defer fake.isEOFMutex.Unlock()
	fake.IsEOFStub = nil
	if fake.isEOFReturnsOnCall == nil {
		fake.isEOFReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isEOFReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeReader) Pos(arg1 int) parsley.Pos {
	fake.posMutex.Lock()
	ret, specificReturn := fake.posReturnsOnCall[len(fake.posArgsForCall)]
	fake.posArgsForCall = append(fake.posArgsForCall, struct {
		arg1 int
	}{arg1})
	stub := fake.PosStub
	fakeReturns := fake.posReturns
	fake.recordInvocation("Pos", []interface{}{arg1})
	fake.posMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeReader) PosCallCount() int {
	fake.posMutex.RLock()
	defer fake.posMutex.RUnlock()
	return len(fake.posArgsForCall)
}

func (fake *FakeReader) PosCalls(stub func(int) parsley.Pos) {
	fake.posMutex.Lock()
	defer fake.posMutex.Unlock()
	fake.PosStub = stub
}

func (fake *FakeReader) PosArgsForCall(i int) int {
	fake.posMutex.RLock()
	defer fake.posMutex.RUnlock()
	argsForCall := fake.posArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeReader) PosReturns(result1 parsley.Pos) {
	fake.posMutex.Lock()
	defer fake.posMutex.Unlock()
	fake.PosStub = nil
	fake.posReturns = struct {
		result1 parsley.Pos
	}{result1}
}

func (fake *FakeReader) PosReturnsOnCall(i int, result1 parsley.Pos) {
	fake.posMutex.Lock()
	defer fake.posMutex.Unlock()
	fake.PosStub = nil
	if fake.posReturnsOnCall == nil {
		fake.posReturnsOnCall = make(map[int]struct {
			result1 parsley.Pos
		})
	}
	fake.posReturnsOnCall[i] = struct {
		result1 parsley.Pos
	}{result1}
}

func (fake *FakeReader) Remaining(arg1 parsley.Pos) int {
	fake.remainingMutex.Lock()
	ret, specificReturn := fake.remainingReturnsOnCall[len(fake.remainingArgsForCall)]
	fake.remainingArgsForCall = append(fake.remainingArgsForCall, struct {
		arg1 parsley.Pos
	}{arg1})
	stub := fake.RemainingStub
	fakeReturns := fake.remainingReturns
	fake.recordInvocation("Remaining", []interface{}{arg1})
	fake.remainingMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeReader) RemainingCallCount() int {
	fake.remainingMutex.RLock()
	defer fake.remainingMutex.RUnlock()
	return len(fake.remainingArgsForCall)
}

func (fake *FakeReader) RemainingCalls(stub func(parsley.Pos) int) {
	fake.remainingMutex.Lock()
	defer fake.remainingMutex.Unlock()
	fake.RemainingStub = stub
}

func (fake *FakeReader) RemainingArgsForCall(i int) parsley.Pos {
	fake.remainingMutex.RLock()
	defer fake.remainingMutex.RUnlock()
	argsForCall := fake.remainingArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeReader) RemainingReturns(result1 int) {
	fake.remainingMutex.Lock()
	defer fake.remainingMutex.Unlock()
	fake.RemainingStub = nil
	fake.remainingReturns = struct {
		result1 int
	}{result1}
}

func (fake *FakeReader) RemainingReturnsOnCall(i int, result1 int) {
	fake.remainingMutex.Lock()
	defer fake.remainingMutex.Unlock()
	fake.RemainingStub = nil
	if fake.remainingReturnsOnCall == nil {
		fake.remainingReturnsOnCall = make(map[int]struct {
			result1 int
		})
	}
	fake.remainingReturnsOnCall[i] = struct {
		result1 int
	}{result1}
}

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

func (fake *FakeReader) 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 _ parsley.Reader = new(FakeReader)
