-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_Notification_service.go
137 lines (109 loc) · 5.16 KB
/
mock_Notification_service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Code generated by mockery v2.40.1. DO NOT EDIT.
package mocks
import (
context "context"
notification "github.com/awlsring/texit/internal/pkg/domain/notification"
mock "github.com/stretchr/testify/mock"
workflow "github.com/awlsring/texit/internal/pkg/domain/workflow"
)
// MockNotification_service is an autogenerated mock type for the Notification type
type MockNotification_service struct {
mock.Mock
}
type MockNotification_service_Expecter struct {
mock *mock.Mock
}
func (_m *MockNotification_service) EXPECT() *MockNotification_service_Expecter {
return &MockNotification_service_Expecter{mock: &_m.Mock}
}
// ListNotifiers provides a mock function with given fields: ctx
func (_m *MockNotification_service) ListNotifiers(ctx context.Context) []*notification.Notifier {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for ListNotifiers")
}
var r0 []*notification.Notifier
if rf, ok := ret.Get(0).(func(context.Context) []*notification.Notifier); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*notification.Notifier)
}
}
return r0
}
// MockNotification_service_ListNotifiers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNotifiers'
type MockNotification_service_ListNotifiers_Call struct {
*mock.Call
}
// ListNotifiers is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockNotification_service_Expecter) ListNotifiers(ctx interface{}) *MockNotification_service_ListNotifiers_Call {
return &MockNotification_service_ListNotifiers_Call{Call: _e.mock.On("ListNotifiers", ctx)}
}
func (_c *MockNotification_service_ListNotifiers_Call) Run(run func(ctx context.Context)) *MockNotification_service_ListNotifiers_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockNotification_service_ListNotifiers_Call) Return(_a0 []*notification.Notifier) *MockNotification_service_ListNotifiers_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockNotification_service_ListNotifiers_Call) RunAndReturn(run func(context.Context) []*notification.Notifier) *MockNotification_service_ListNotifiers_Call {
_c.Call.Return(run)
return _c
}
// NotifyExecutionCompletion provides a mock function with given fields: ctx, e, w, status, results
func (_m *MockNotification_service) NotifyExecutionCompletion(ctx context.Context, e workflow.ExecutionIdentifier, w workflow.WorkflowName, status workflow.Status, results workflow.ExecutionResult) error {
ret := _m.Called(ctx, e, w, status, results)
if len(ret) == 0 {
panic("no return value specified for NotifyExecutionCompletion")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, workflow.ExecutionIdentifier, workflow.WorkflowName, workflow.Status, workflow.ExecutionResult) error); ok {
r0 = rf(ctx, e, w, status, results)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockNotification_service_NotifyExecutionCompletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NotifyExecutionCompletion'
type MockNotification_service_NotifyExecutionCompletion_Call struct {
*mock.Call
}
// NotifyExecutionCompletion is a helper method to define mock.On call
// - ctx context.Context
// - e workflow.ExecutionIdentifier
// - w workflow.WorkflowName
// - status workflow.Status
// - results workflow.ExecutionResult
func (_e *MockNotification_service_Expecter) NotifyExecutionCompletion(ctx interface{}, e interface{}, w interface{}, status interface{}, results interface{}) *MockNotification_service_NotifyExecutionCompletion_Call {
return &MockNotification_service_NotifyExecutionCompletion_Call{Call: _e.mock.On("NotifyExecutionCompletion", ctx, e, w, status, results)}
}
func (_c *MockNotification_service_NotifyExecutionCompletion_Call) Run(run func(ctx context.Context, e workflow.ExecutionIdentifier, w workflow.WorkflowName, status workflow.Status, results workflow.ExecutionResult)) *MockNotification_service_NotifyExecutionCompletion_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(workflow.ExecutionIdentifier), args[2].(workflow.WorkflowName), args[3].(workflow.Status), args[4].(workflow.ExecutionResult))
})
return _c
}
func (_c *MockNotification_service_NotifyExecutionCompletion_Call) Return(_a0 error) *MockNotification_service_NotifyExecutionCompletion_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockNotification_service_NotifyExecutionCompletion_Call) RunAndReturn(run func(context.Context, workflow.ExecutionIdentifier, workflow.WorkflowName, workflow.Status, workflow.ExecutionResult) error) *MockNotification_service_NotifyExecutionCompletion_Call {
_c.Call.Return(run)
return _c
}
// NewMockNotification_service creates a new instance of MockNotification_service. 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 NewMockNotification_service(t interface {
mock.TestingT
Cleanup(func())
}) *MockNotification_service {
mock := &MockNotification_service{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}