// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package screencast import ( mock "github.com/stretchr/testify/mock" ) // newMockdialer creates a new instance of mockdialer. 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 newMockdialer(t interface { mock.TestingT Cleanup(func()) }) *mockdialer { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &mockdialer{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // mockdialer is an autogenerated mock type for the dialer type type mockdialer struct { mock.Mock } type mockdialer_Expecter struct { mock *mock.Mock } func (_m *mockdialer) EXPECT() *mockdialer_Expecter { return &mockdialer_Expecter{mock: &_m.Mock} } // Dial provides a mock function for the type mockdialer func (_mock *mockdialer) Dial(address string) (bus, error) { ret := _mock.Called(address) if len(ret) == 0 { panic("no return value specified for Dial") } var r0 bus var r1 error if returnFunc, ok := ret.Get(0).(func(string) (bus, error)); ok { return returnFunc(address) } if returnFunc, ok := ret.Get(0).(func(string) bus); ok { r0 = returnFunc(address) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(bus) } } if returnFunc, ok := ret.Get(1).(func(string) error); ok { r1 = returnFunc(address) } else { r1 = ret.Error(1) } return r0, r1 } // mockdialer_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' type mockdialer_Dial_Call struct { *mock.Call } // Dial is a helper method to define mock.On call // - address string func (_e *mockdialer_Expecter) Dial(address any) *mockdialer_Dial_Call { return &mockdialer_Dial_Call{Call: _e.mock.On("Dial", address)} } func (_c *mockdialer_Dial_Call) Run(run func(address string)) *mockdialer_Dial_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 string if args[0] != nil { arg0 = args[0].(string) } run( arg0, ) }) return _c } func (_c *mockdialer_Dial_Call) Return(busMoqParam bus, err error) *mockdialer_Dial_Call { _c.Call.Return(busMoqParam, err) return _c } func (_c *mockdialer_Dial_Call) RunAndReturn(run func(address string) (bus, error)) *mockdialer_Dial_Call { _c.Call.Return(run) return _c }