// Code generated by mockery. DO NOT EDIT.

package mock_parsers

import (
	common "github.com/anyproto/anytype-heart/core/block/import/common"
	mock "github.com/stretchr/testify/mock"
)

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

type MockParser_Expecter struct {
	mock *mock.Mock
}

func (_m *MockParser) EXPECT() *MockParser_Expecter {
	return &MockParser_Expecter{mock: &_m.Mock}
}

// MatchUrl provides a mock function with given fields: url
func (_m *MockParser) MatchUrl(url string) bool {
	ret := _m.Called(url)

	if len(ret) == 0 {
		panic("no return value specified for MatchUrl")
	}

	var r0 bool
	if rf, ok := ret.Get(0).(func(string) bool); ok {
		r0 = rf(url)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

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

// MatchUrl is a helper method to define mock.On call
//   - url string
func (_e *MockParser_Expecter) MatchUrl(url interface{}) *MockParser_MatchUrl_Call {
	return &MockParser_MatchUrl_Call{Call: _e.mock.On("MatchUrl", url)}
}

func (_c *MockParser_MatchUrl_Call) Run(run func(url string)) *MockParser_MatchUrl_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *MockParser_MatchUrl_Call) Return(_a0 bool) *MockParser_MatchUrl_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockParser_MatchUrl_Call) RunAndReturn(run func(string) bool) *MockParser_MatchUrl_Call {
	_c.Call.Return(run)
	return _c
}

// ParseUrl provides a mock function with given fields: url
func (_m *MockParser) ParseUrl(url string) (*common.StateSnapshot, error) {
	ret := _m.Called(url)

	if len(ret) == 0 {
		panic("no return value specified for ParseUrl")
	}

	var r0 *common.StateSnapshot
	var r1 error
	if rf, ok := ret.Get(0).(func(string) (*common.StateSnapshot, error)); ok {
		return rf(url)
	}
	if rf, ok := ret.Get(0).(func(string) *common.StateSnapshot); ok {
		r0 = rf(url)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*common.StateSnapshot)
		}
	}

	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(url)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// ParseUrl is a helper method to define mock.On call
//   - url string
func (_e *MockParser_Expecter) ParseUrl(url interface{}) *MockParser_ParseUrl_Call {
	return &MockParser_ParseUrl_Call{Call: _e.mock.On("ParseUrl", url)}
}

func (_c *MockParser_ParseUrl_Call) Run(run func(url string)) *MockParser_ParseUrl_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *MockParser_ParseUrl_Call) Return(_a0 *common.StateSnapshot, _a1 error) *MockParser_ParseUrl_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockParser_ParseUrl_Call) RunAndReturn(run func(string) (*common.StateSnapshot, error)) *MockParser_ParseUrl_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockParser creates a new instance of MockParser. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockParser(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockParser {
	mock := &MockParser{}
	mock.Mock.Test(t)

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

	return mock
}
