/
task_info_mock.go
120 lines (98 loc) · 3.25 KB
/
task_info_mock.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
// Code generated by mockery v2.36.1. DO NOT EDIT.
package dao
import (
api "github.com/content-services/content-sources-backend/pkg/api"
mock "github.com/stretchr/testify/mock"
)
// MockTaskInfoDao is an autogenerated mock type for the TaskInfoDao type
type MockTaskInfoDao struct {
mock.Mock
}
// Cleanup provides a mock function with given fields:
func (_m *MockTaskInfoDao) Cleanup() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// Fetch provides a mock function with given fields: OrgID, id
func (_m *MockTaskInfoDao) Fetch(OrgID string, id string) (api.TaskInfoResponse, error) {
ret := _m.Called(OrgID, id)
var r0 api.TaskInfoResponse
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (api.TaskInfoResponse, error)); ok {
return rf(OrgID, id)
}
if rf, ok := ret.Get(0).(func(string, string) api.TaskInfoResponse); ok {
r0 = rf(OrgID, id)
} else {
r0 = ret.Get(0).(api.TaskInfoResponse)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(OrgID, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// IsSnapshotInProgress provides a mock function with given fields: orgID, repoUUID
func (_m *MockTaskInfoDao) IsSnapshotInProgress(orgID string, repoUUID string) (bool, error) {
ret := _m.Called(orgID, repoUUID)
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
return rf(orgID, repoUUID)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(orgID, repoUUID)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(orgID, repoUUID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: OrgID, pageData, filterData
func (_m *MockTaskInfoDao) List(OrgID string, pageData api.PaginationData, filterData api.TaskInfoFilterData) (api.TaskInfoCollectionResponse, int64, error) {
ret := _m.Called(OrgID, pageData, filterData)
var r0 api.TaskInfoCollectionResponse
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(string, api.PaginationData, api.TaskInfoFilterData) (api.TaskInfoCollectionResponse, int64, error)); ok {
return rf(OrgID, pageData, filterData)
}
if rf, ok := ret.Get(0).(func(string, api.PaginationData, api.TaskInfoFilterData) api.TaskInfoCollectionResponse); ok {
r0 = rf(OrgID, pageData, filterData)
} else {
r0 = ret.Get(0).(api.TaskInfoCollectionResponse)
}
if rf, ok := ret.Get(1).(func(string, api.PaginationData, api.TaskInfoFilterData) int64); ok {
r1 = rf(OrgID, pageData, filterData)
} else {
r1 = ret.Get(1).(int64)
}
if rf, ok := ret.Get(2).(func(string, api.PaginationData, api.TaskInfoFilterData) error); ok {
r2 = rf(OrgID, pageData, filterData)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// NewMockTaskInfoDao creates a new instance of MockTaskInfoDao. 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 NewMockTaskInfoDao(t interface {
mock.TestingT
Cleanup(func())
}) *MockTaskInfoDao {
mock := &MockTaskInfoDao{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}