contentattacher_mock_test.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package app
6
7import (
8 "github.com/bnema/neferwl/internal/ports"
9 mock "github.com/stretchr/testify/mock"
10)
11
12// newMockcontentAttacher creates a new instance of mockcontentAttacher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13// The first argument is typically a *testing.T value.
14func newMockcontentAttacher(t interface {
15 mock.TestingT
16 Cleanup(func())
17}) *mockcontentAttacher {
18 if helper, ok := t.(interface{ Helper() }); ok {
19 helper.Helper()
20 }
21
22 mock := &mockcontentAttacher{}
23 mock.Mock.Test(t)
24
25 t.Cleanup(func() {
26 if helper, ok := t.(interface{ Helper() }); ok {
27 helper.Helper()
28 }
29 mock.AssertExpectations(t)
30 })
31
32 return mock
33}
34
35// mockcontentAttacher is an autogenerated mock type for the contentAttacher type
36type mockcontentAttacher struct {
37 mock.Mock
38}
39
40type mockcontentAttacher_Expecter struct {
41 mock *mock.Mock
42}
43
44func (_m *mockcontentAttacher) EXPECT() *mockcontentAttacher_Expecter {
45 return &mockcontentAttacher_Expecter{mock: &_m.Mock}
46}
47
48// AttachOutput provides a mock function for the type mockcontentAttacher
49func (_mock *mockcontentAttacher) AttachOutput(name string) (<-chan *ports.ContentBatch, ports.ContentReturn) {
50 ret := _mock.Called(name)
51
52 if len(ret) == 0 {
53 panic("no return value specified for AttachOutput")
54 }
55
56 var r0 <-chan *ports.ContentBatch
57 var r1 ports.ContentReturn
58 if returnFunc, ok := ret.Get(0).(func(string) (<-chan *ports.ContentBatch, ports.ContentReturn)); ok {
59 return returnFunc(name)
60 }
61 if returnFunc, ok := ret.Get(0).(func(string) <-chan *ports.ContentBatch); ok {
62 r0 = returnFunc(name)
63 } else {
64 if ret.Get(0) != nil {
65 r0 = ret.Get(0).(<-chan *ports.ContentBatch)
66 }
67 }
68 if returnFunc, ok := ret.Get(1).(func(string) ports.ContentReturn); ok {
69 r1 = returnFunc(name)
70 } else {
71 if ret.Get(1) != nil {
72 r1 = ret.Get(1).(ports.ContentReturn)
73 }
74 }
75 return r0, r1
76}
77
78// mockcontentAttacher_AttachOutput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AttachOutput'
79type mockcontentAttacher_AttachOutput_Call struct {
80 *mock.Call
81}
82
83// AttachOutput is a helper method to define mock.On call
84// - name string
85func (_e *mockcontentAttacher_Expecter) AttachOutput(name any) *mockcontentAttacher_AttachOutput_Call {
86 return &mockcontentAttacher_AttachOutput_Call{Call: _e.mock.On("AttachOutput", name)}
87}
88
89func (_c *mockcontentAttacher_AttachOutput_Call) Run(run func(name string)) *mockcontentAttacher_AttachOutput_Call {
90 _c.Call.Run(func(args mock.Arguments) {
91 var arg0 string
92 if args[0] != nil {
93 arg0 = args[0].(string)
94 }
95 run(
96 arg0,
97 )
98 })
99 return _c
100}
101
102func (_c *mockcontentAttacher_AttachOutput_Call) Return(contentBatchCh <-chan *ports.ContentBatch, contentReturn ports.ContentReturn) *mockcontentAttacher_AttachOutput_Call {
103 _c.Call.Return(contentBatchCh, contentReturn)
104 return _c
105}
106
107func (_c *mockcontentAttacher_AttachOutput_Call) RunAndReturn(run func(name string) (<-chan *ports.ContentBatch, ports.ContentReturn)) *mockcontentAttacher_AttachOutput_Call {
108 _c.Call.Return(run)
109 return _c
110}
111
112// DetachOutput provides a mock function for the type mockcontentAttacher
113func (_mock *mockcontentAttacher) DetachOutput(feed ports.ContentReturn) {
114 _mock.Called(feed)
115 return
116}
117
118// mockcontentAttacher_DetachOutput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetachOutput'
119type mockcontentAttacher_DetachOutput_Call struct {
120 *mock.Call
121}
122
123// DetachOutput is a helper method to define mock.On call
124// - feed ports.ContentReturn
125func (_e *mockcontentAttacher_Expecter) DetachOutput(feed any) *mockcontentAttacher_DetachOutput_Call {
126 return &mockcontentAttacher_DetachOutput_Call{Call: _e.mock.On("DetachOutput", feed)}
127}
128
129func (_c *mockcontentAttacher_DetachOutput_Call) Run(run func(feed ports.ContentReturn)) *mockcontentAttacher_DetachOutput_Call {
130 _c.Call.Run(func(args mock.Arguments) {
131 var arg0 ports.ContentReturn
132 if args[0] != nil {
133 arg0 = args[0].(ports.ContentReturn)
134 }
135 run(
136 arg0,
137 )
138 })
139 return _c
140}
141
142func (_c *mockcontentAttacher_DetachOutput_Call) Return() *mockcontentAttacher_DetachOutput_Call {
143 _c.Call.Return()
144 return _c
145}
146
147func (_c *mockcontentAttacher_DetachOutput_Call) RunAndReturn(run func(feed ports.ContentReturn)) *mockcontentAttacher_DetachOutput_Call {
148 _c.Run(run)
149 return _c
150}