runner_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 "context"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// newMockrunner creates a new instance of mockrunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func newMockrunner(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *mockrunner {
19 if helper, ok := t.(interface{ Helper() }); ok {
20 helper.Helper()
21 }
22
23 mock := &mockrunner{}
24 mock.Mock.Test(t)
25
26 t.Cleanup(func() {
27 if helper, ok := t.(interface{ Helper() }); ok {
28 helper.Helper()
29 }
30 mock.AssertExpectations(t)
31 })
32
33 return mock
34}
35
36// mockrunner is an autogenerated mock type for the runner type
37type mockrunner struct {
38 mock.Mock
39}
40
41type mockrunner_Expecter struct {
42 mock *mock.Mock
43}
44
45func (_m *mockrunner) EXPECT() *mockrunner_Expecter {
46 return &mockrunner_Expecter{mock: &_m.Mock}
47}
48
49// Run provides a mock function for the type mockrunner
50func (_mock *mockrunner) Run(ctx context.Context, args []string) error {
51 ret := _mock.Called(ctx, args)
52
53 if len(ret) == 0 {
54 panic("no return value specified for Run")
55 }
56
57 var r0 error
58 if returnFunc, ok := ret.Get(0).(func(context.Context, []string) error); ok {
59 r0 = returnFunc(ctx, args)
60 } else {
61 r0 = ret.Error(0)
62 }
63 return r0
64}
65
66// mockrunner_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
67type mockrunner_Run_Call struct {
68 *mock.Call
69}
70
71// Run is a helper method to define mock.On call
72// - ctx context.Context
73// - args []string
74func (_e *mockrunner_Expecter) Run(ctx any, args any) *mockrunner_Run_Call {
75 return &mockrunner_Run_Call{Call: _e.mock.On("Run", ctx, args)}
76}
77
78func (_c *mockrunner_Run_Call) Run(run func(ctx context.Context, args []string)) *mockrunner_Run_Call {
79 _c.Call.Run(func(args mock.Arguments) {
80 var arg0 context.Context
81 if args[0] != nil {
82 arg0 = args[0].(context.Context)
83 }
84 var arg1 []string
85 if args[1] != nil {
86 arg1 = args[1].([]string)
87 }
88 run(
89 arg0,
90 arg1,
91 )
92 })
93 return _c
94}
95
96func (_c *mockrunner_Run_Call) Return(err error) *mockrunner_Run_Call {
97 _c.Call.Return(err)
98 return _c
99}
100
101func (_c *mockrunner_Run_Call) RunAndReturn(run func(ctx context.Context, args []string) error) *mockrunner_Run_Call {
102 _c.Call.Return(run)
103 return _c
104}