dialer_mock_test.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package screencast
6
7import (
8 mock "github.com/stretchr/testify/mock"
9)
10
11// 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.
12// The first argument is typically a *testing.T value.
13func newMockdialer(t interface {
14 mock.TestingT
15 Cleanup(func())
16}) *mockdialer {
17 if helper, ok := t.(interface{ Helper() }); ok {
18 helper.Helper()
19 }
20
21 mock := &mockdialer{}
22 mock.Mock.Test(t)
23
24 t.Cleanup(func() {
25 if helper, ok := t.(interface{ Helper() }); ok {
26 helper.Helper()
27 }
28 mock.AssertExpectations(t)
29 })
30
31 return mock
32}
33
34// mockdialer is an autogenerated mock type for the dialer type
35type mockdialer struct {
36 mock.Mock
37}
38
39type mockdialer_Expecter struct {
40 mock *mock.Mock
41}
42
43func (_m *mockdialer) EXPECT() *mockdialer_Expecter {
44 return &mockdialer_Expecter{mock: &_m.Mock}
45}
46
47// Dial provides a mock function for the type mockdialer
48func (_mock *mockdialer) Dial(address string) (bus, error) {
49 ret := _mock.Called(address)
50
51 if len(ret) == 0 {
52 panic("no return value specified for Dial")
53 }
54
55 var r0 bus
56 var r1 error
57 if returnFunc, ok := ret.Get(0).(func(string) (bus, error)); ok {
58 return returnFunc(address)
59 }
60 if returnFunc, ok := ret.Get(0).(func(string) bus); ok {
61 r0 = returnFunc(address)
62 } else {
63 if ret.Get(0) != nil {
64 r0 = ret.Get(0).(bus)
65 }
66 }
67 if returnFunc, ok := ret.Get(1).(func(string) error); ok {
68 r1 = returnFunc(address)
69 } else {
70 r1 = ret.Error(1)
71 }
72 return r0, r1
73}
74
75// mockdialer_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial'
76type mockdialer_Dial_Call struct {
77 *mock.Call
78}
79
80// Dial is a helper method to define mock.On call
81// - address string
82func (_e *mockdialer_Expecter) Dial(address any) *mockdialer_Dial_Call {
83 return &mockdialer_Dial_Call{Call: _e.mock.On("Dial", address)}
84}
85
86func (_c *mockdialer_Dial_Call) Run(run func(address string)) *mockdialer_Dial_Call {
87 _c.Call.Run(func(args mock.Arguments) {
88 var arg0 string
89 if args[0] != nil {
90 arg0 = args[0].(string)
91 }
92 run(
93 arg0,
94 )
95 })
96 return _c
97}
98
99func (_c *mockdialer_Dial_Call) Return(busMoqParam bus, err error) *mockdialer_Dial_Call {
100 _c.Call.Return(busMoqParam, err)
101 return _c
102}
103
104func (_c *mockdialer_Dial_Call) RunAndReturn(run func(address string) (bus, error)) *mockdialer_Dial_Call {
105 _c.Call.Return(run)
106 return _c
107}