// Code generated by mockery v2.26.1. DO NOT EDIT.

package mocks

import (
	context "context"

	permanentbranches "github.com/ergomake/ergomake/internal/permanentbranches"
	mock "github.com/stretchr/testify/mock"
)

// PermanentBranchesProvider is an autogenerated mock type for the PermanentBranchesProvider type
type PermanentBranchesProvider struct {
	mock.Mock
}

type PermanentBranchesProvider_Expecter struct {
	mock *mock.Mock
}

func (_m *PermanentBranchesProvider) EXPECT() *PermanentBranchesProvider_Expecter {
	return &PermanentBranchesProvider_Expecter{mock: &_m.Mock}
}

// BatchUpsert provides a mock function with given fields: ctx, owner, repo, branches
func (_m *PermanentBranchesProvider) BatchUpsert(ctx context.Context, owner string, repo string, branches []string) (permanentbranches.BatchUpsertResult, error) {
	ret := _m.Called(ctx, owner, repo, branches)

	var r0 permanentbranches.BatchUpsertResult
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) (permanentbranches.BatchUpsertResult, error)); ok {
		return rf(ctx, owner, repo, branches)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) permanentbranches.BatchUpsertResult); ok {
		r0 = rf(ctx, owner, repo, branches)
	} else {
		r0 = ret.Get(0).(permanentbranches.BatchUpsertResult)
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, []string) error); ok {
		r1 = rf(ctx, owner, repo, branches)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// PermanentBranchesProvider_BatchUpsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchUpsert'
type PermanentBranchesProvider_BatchUpsert_Call struct {
	*mock.Call
}

// BatchUpsert is a helper method to define mock.On call
//   - ctx context.Context
//   - owner string
//   - repo string
//   - branches []string
func (_e *PermanentBranchesProvider_Expecter) BatchUpsert(ctx interface{}, owner interface{}, repo interface{}, branches interface{}) *PermanentBranchesProvider_BatchUpsert_Call {
	return &PermanentBranchesProvider_BatchUpsert_Call{Call: _e.mock.On("BatchUpsert", ctx, owner, repo, branches)}
}

func (_c *PermanentBranchesProvider_BatchUpsert_Call) Run(run func(ctx context.Context, owner string, repo string, branches []string)) *PermanentBranchesProvider_BatchUpsert_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string))
	})
	return _c
}

func (_c *PermanentBranchesProvider_BatchUpsert_Call) Return(_a0 permanentbranches.BatchUpsertResult, _a1 error) *PermanentBranchesProvider_BatchUpsert_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *PermanentBranchesProvider_BatchUpsert_Call) RunAndReturn(run func(context.Context, string, string, []string) (permanentbranches.BatchUpsertResult, error)) *PermanentBranchesProvider_BatchUpsert_Call {
	_c.Call.Return(run)
	return _c
}

// IsPermanentBranch provides a mock function with given fields: ctx, owner, repo, branch
func (_m *PermanentBranchesProvider) IsPermanentBranch(ctx context.Context, owner string, repo string, branch string) (bool, error) {
	ret := _m.Called(ctx, owner, repo, branch)

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (bool, error)); ok {
		return rf(ctx, owner, repo, branch)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) bool); ok {
		r0 = rf(ctx, owner, repo, branch)
	} else {
		r0 = ret.Get(0).(bool)
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = rf(ctx, owner, repo, branch)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// PermanentBranchesProvider_IsPermanentBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsPermanentBranch'
type PermanentBranchesProvider_IsPermanentBranch_Call struct {
	*mock.Call
}

// IsPermanentBranch is a helper method to define mock.On call
//   - ctx context.Context
//   - owner string
//   - repo string
//   - branch string
func (_e *PermanentBranchesProvider_Expecter) IsPermanentBranch(ctx interface{}, owner interface{}, repo interface{}, branch interface{}) *PermanentBranchesProvider_IsPermanentBranch_Call {
	return &PermanentBranchesProvider_IsPermanentBranch_Call{Call: _e.mock.On("IsPermanentBranch", ctx, owner, repo, branch)}
}

func (_c *PermanentBranchesProvider_IsPermanentBranch_Call) Run(run func(ctx context.Context, owner string, repo string, branch string)) *PermanentBranchesProvider_IsPermanentBranch_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string))
	})
	return _c
}

func (_c *PermanentBranchesProvider_IsPermanentBranch_Call) Return(_a0 bool, _a1 error) *PermanentBranchesProvider_IsPermanentBranch_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *PermanentBranchesProvider_IsPermanentBranch_Call) RunAndReturn(run func(context.Context, string, string, string) (bool, error)) *PermanentBranchesProvider_IsPermanentBranch_Call {
	_c.Call.Return(run)
	return _c
}

// List provides a mock function with given fields: ctx, owner, repo
func (_m *PermanentBranchesProvider) List(ctx context.Context, owner string, repo string) ([]string, error) {
	ret := _m.Called(ctx, owner, repo)

	var r0 []string
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]string, error)); ok {
		return rf(ctx, owner, repo)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) []string); ok {
		r0 = rf(ctx, owner, repo)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, owner, repo)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// PermanentBranchesProvider_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
type PermanentBranchesProvider_List_Call struct {
	*mock.Call
}

// List is a helper method to define mock.On call
//   - ctx context.Context
//   - owner string
//   - repo string
func (_e *PermanentBranchesProvider_Expecter) List(ctx interface{}, owner interface{}, repo interface{}) *PermanentBranchesProvider_List_Call {
	return &PermanentBranchesProvider_List_Call{Call: _e.mock.On("List", ctx, owner, repo)}
}

func (_c *PermanentBranchesProvider_List_Call) Run(run func(ctx context.Context, owner string, repo string)) *PermanentBranchesProvider_List_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string))
	})
	return _c
}

func (_c *PermanentBranchesProvider_List_Call) Return(_a0 []string, _a1 error) *PermanentBranchesProvider_List_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *PermanentBranchesProvider_List_Call) RunAndReturn(run func(context.Context, string, string) ([]string, error)) *PermanentBranchesProvider_List_Call {
	_c.Call.Return(run)
	return _c
}

type mockConstructorTestingTNewPermanentBranchesProvider interface {
	mock.TestingT
	Cleanup(func())
}

// NewPermanentBranchesProvider creates a new instance of PermanentBranchesProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewPermanentBranchesProvider(t mockConstructorTestingTNewPermanentBranchesProvider) *PermanentBranchesProvider {
	mock := &PermanentBranchesProvider{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
