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

import (
	"sync"

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

type FakeNodeTransformerInterpreter struct {
	EvalStub        func(interface{}, parsley.NonTerminalNode) (interface{}, parsley.Error)
	evalMutex       sync.RWMutex
	evalArgsForCall []struct {
		arg1 interface{}
		arg2 parsley.NonTerminalNode
	}
	evalReturns struct {
		result1 interface{}
		result2 parsley.Error
	}
	evalReturnsOnCall map[int]struct {
		result1 interface{}
		result2 parsley.Error
	}
	TransformNodeStub        func(interface{}, parsley.Node) (parsley.Node, parsley.Error)
	transformNodeMutex       sync.RWMutex
	transformNodeArgsForCall []struct {
		arg1 interface{}
		arg2 parsley.Node
	}
	transformNodeReturns struct {
		result1 parsley.Node
		result2 parsley.Error
	}
	transformNodeReturnsOnCall map[int]struct {
		result1 parsley.Node
		result2 parsley.Error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeNodeTransformerInterpreter) Eval(arg1 interface{}, arg2 parsley.NonTerminalNode) (interface{}, parsley.Error) {
	fake.evalMutex.Lock()
	ret, specificReturn := fake.evalReturnsOnCall[len(fake.evalArgsForCall)]
	fake.evalArgsForCall = append(fake.evalArgsForCall, struct {
		arg1 interface{}
		arg2 parsley.NonTerminalNode
	}{arg1, arg2})
	stub := fake.EvalStub
	fakeReturns := fake.evalReturns
	fake.recordInvocation("Eval", []interface{}{arg1, arg2})
	fake.evalMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeNodeTransformerInterpreter) EvalCallCount() int {
	fake.evalMutex.RLock()
	defer fake.evalMutex.RUnlock()
	return len(fake.evalArgsForCall)
}

func (fake *FakeNodeTransformerInterpreter) EvalCalls(stub func(interface{}, parsley.NonTerminalNode) (interface{}, parsley.Error)) {
	fake.evalMutex.Lock()
	defer fake.evalMutex.Unlock()
	fake.EvalStub = stub
}

func (fake *FakeNodeTransformerInterpreter) EvalArgsForCall(i int) (interface{}, parsley.NonTerminalNode) {
	fake.evalMutex.RLock()
	defer fake.evalMutex.RUnlock()
	argsForCall := fake.evalArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeNodeTransformerInterpreter) EvalReturns(result1 interface{}, result2 parsley.Error) {
	fake.evalMutex.Lock()
	defer fake.evalMutex.Unlock()
	fake.EvalStub = nil
	fake.evalReturns = struct {
		result1 interface{}
		result2 parsley.Error
	}{result1, result2}
}

func (fake *FakeNodeTransformerInterpreter) EvalReturnsOnCall(i int, result1 interface{}, result2 parsley.Error) {
	fake.evalMutex.Lock()
	defer fake.evalMutex.Unlock()
	fake.EvalStub = nil
	if fake.evalReturnsOnCall == nil {
		fake.evalReturnsOnCall = make(map[int]struct {
			result1 interface{}
			result2 parsley.Error
		})
	}
	fake.evalReturnsOnCall[i] = struct {
		result1 interface{}
		result2 parsley.Error
	}{result1, result2}
}

func (fake *FakeNodeTransformerInterpreter) TransformNode(arg1 interface{}, arg2 parsley.Node) (parsley.Node, parsley.Error) {
	fake.transformNodeMutex.Lock()
	ret, specificReturn := fake.transformNodeReturnsOnCall[len(fake.transformNodeArgsForCall)]
	fake.transformNodeArgsForCall = append(fake.transformNodeArgsForCall, struct {
		arg1 interface{}
		arg2 parsley.Node
	}{arg1, arg2})
	stub := fake.TransformNodeStub
	fakeReturns := fake.transformNodeReturns
	fake.recordInvocation("TransformNode", []interface{}{arg1, arg2})
	fake.transformNodeMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeNodeTransformerInterpreter) TransformNodeCallCount() int {
	fake.transformNodeMutex.RLock()
	defer fake.transformNodeMutex.RUnlock()
	return len(fake.transformNodeArgsForCall)
}

func (fake *FakeNodeTransformerInterpreter) TransformNodeCalls(stub func(interface{}, parsley.Node) (parsley.Node, parsley.Error)) {
	fake.transformNodeMutex.Lock()
	defer fake.transformNodeMutex.Unlock()
	fake.TransformNodeStub = stub
}

func (fake *FakeNodeTransformerInterpreter) TransformNodeArgsForCall(i int) (interface{}, parsley.Node) {
	fake.transformNodeMutex.RLock()
	defer fake.transformNodeMutex.RUnlock()
	argsForCall := fake.transformNodeArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeNodeTransformerInterpreter) TransformNodeReturns(result1 parsley.Node, result2 parsley.Error) {
	fake.transformNodeMutex.Lock()
	defer fake.transformNodeMutex.Unlock()
	fake.TransformNodeStub = nil
	fake.transformNodeReturns = struct {
		result1 parsley.Node
		result2 parsley.Error
	}{result1, result2}
}

func (fake *FakeNodeTransformerInterpreter) TransformNodeReturnsOnCall(i int, result1 parsley.Node, result2 parsley.Error) {
	fake.transformNodeMutex.Lock()
	defer fake.transformNodeMutex.Unlock()
	fake.TransformNodeStub = nil
	if fake.transformNodeReturnsOnCall == nil {
		fake.transformNodeReturnsOnCall = make(map[int]struct {
			result1 parsley.Node
			result2 parsley.Error
		})
	}
	fake.transformNodeReturnsOnCall[i] = struct {
		result1 parsley.Node
		result2 parsley.Error
	}{result1, result2}
}

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

func (fake *FakeNodeTransformerInterpreter) 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.NodeTransformerInterpreter = new(FakeNodeTransformerInterpreter)
