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

package server

import mock "github.com/stretchr/testify/mock"

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

type mockUDPConn_Expecter struct {
	mock *mock.Mock
}

func (_m *mockUDPConn) EXPECT() *mockUDPConn_Expecter {
	return &mockUDPConn_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with no fields
func (_m *mockUDPConn) Close() error {
	ret := _m.Called()

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

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Close is a helper method to define mock.On call
func (_e *mockUDPConn_Expecter) Close() *mockUDPConn_Close_Call {
	return &mockUDPConn_Close_Call{Call: _e.mock.On("Close")}
}

func (_c *mockUDPConn_Close_Call) Run(run func()) *mockUDPConn_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *mockUDPConn_Close_Call) Return(_a0 error) *mockUDPConn_Close_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *mockUDPConn_Close_Call) RunAndReturn(run func() error) *mockUDPConn_Close_Call {
	_c.Call.Return(run)
	return _c
}

// ReadFrom provides a mock function with given fields: b
func (_m *mockUDPConn) ReadFrom(b []byte) (int, string, error) {
	ret := _m.Called(b)

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

	var r0 int
	var r1 string
	var r2 error
	if rf, ok := ret.Get(0).(func([]byte) (int, string, error)); ok {
		return rf(b)
	}
	if rf, ok := ret.Get(0).(func([]byte) int); ok {
		r0 = rf(b)
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func([]byte) string); ok {
		r1 = rf(b)
	} else {
		r1 = ret.Get(1).(string)
	}

	if rf, ok := ret.Get(2).(func([]byte) error); ok {
		r2 = rf(b)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

// ReadFrom is a helper method to define mock.On call
//   - b []byte
func (_e *mockUDPConn_Expecter) ReadFrom(b interface{}) *mockUDPConn_ReadFrom_Call {
	return &mockUDPConn_ReadFrom_Call{Call: _e.mock.On("ReadFrom", b)}
}

func (_c *mockUDPConn_ReadFrom_Call) Run(run func(b []byte)) *mockUDPConn_ReadFrom_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].([]byte))
	})
	return _c
}

func (_c *mockUDPConn_ReadFrom_Call) Return(_a0 int, _a1 string, _a2 error) *mockUDPConn_ReadFrom_Call {
	_c.Call.Return(_a0, _a1, _a2)
	return _c
}

func (_c *mockUDPConn_ReadFrom_Call) RunAndReturn(run func([]byte) (int, string, error)) *mockUDPConn_ReadFrom_Call {
	_c.Call.Return(run)
	return _c
}

// WriteTo provides a mock function with given fields: b, addr
func (_m *mockUDPConn) WriteTo(b []byte, addr string) (int, error) {
	ret := _m.Called(b, addr)

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

	var r0 int
	var r1 error
	if rf, ok := ret.Get(0).(func([]byte, string) (int, error)); ok {
		return rf(b, addr)
	}
	if rf, ok := ret.Get(0).(func([]byte, string) int); ok {
		r0 = rf(b, addr)
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func([]byte, string) error); ok {
		r1 = rf(b, addr)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// WriteTo is a helper method to define mock.On call
//   - b []byte
//   - addr string
func (_e *mockUDPConn_Expecter) WriteTo(b interface{}, addr interface{}) *mockUDPConn_WriteTo_Call {
	return &mockUDPConn_WriteTo_Call{Call: _e.mock.On("WriteTo", b, addr)}
}

func (_c *mockUDPConn_WriteTo_Call) Run(run func(b []byte, addr string)) *mockUDPConn_WriteTo_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].([]byte), args[1].(string))
	})
	return _c
}

func (_c *mockUDPConn_WriteTo_Call) Return(_a0 int, _a1 error) *mockUDPConn_WriteTo_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *mockUDPConn_WriteTo_Call) RunAndReturn(run func([]byte, string) (int, error)) *mockUDPConn_WriteTo_Call {
	_c.Call.Return(run)
	return _c
}

// newMockUDPConn creates a new instance of mockUDPConn. 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 newMockUDPConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *mockUDPConn {
	mock := &mockUDPConn{}
	mock.Mock.Test(t)

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

	return mock
}
