~evanj/cms

ref: 8a453a73244ce94c291204147a7ee2cbf61f7ab2 cms/internal/c/contenttype/contenttype_mock.go -rw-r--r-- 7.0 KiB
8a453a73Evan M Jones Fix(testing): Refactor'd tests per RBAC feat breakage. All tests 5 months ago
                                                                                
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// Code generated by MockGen. DO NOT EDIT.
// Source: contenttype.go

// Package contenttype is a generated GoMock package.
package contenttype

import (
	reflect "reflect"

	content "git.sr.ht/~evanj/cms/internal/m/content"
	contenttype "git.sr.ht/~evanj/cms/internal/m/contenttype"
	space "git.sr.ht/~evanj/cms/internal/m/space"
	user "git.sr.ht/~evanj/cms/internal/m/user"
	db "git.sr.ht/~evanj/cms/internal/s/db"
	gomock "github.com/golang/mock/gomock"
)

// Mockdber is a mock of dber interface
type Mockdber struct {
	ctrl     *gomock.Controller
	recorder *MockdberMockRecorder
}

// MockdberMockRecorder is the mock recorder for Mockdber
type MockdberMockRecorder struct {
	mock *Mockdber
}

// NewMockdber creates a new mock instance
func NewMockdber(ctrl *gomock.Controller) *Mockdber {
	mock := &Mockdber{ctrl: ctrl}
	mock.recorder = &MockdberMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *Mockdber) EXPECT() *MockdberMockRecorder {
	return m.recorder
}

// UserGet mocks base method
func (m *Mockdber) UserGet(username, password string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserGet", username, password)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserGet indicates an expected call of UserGet
func (mr *MockdberMockRecorder) UserGet(username, password interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserGet", reflect.TypeOf((*Mockdber)(nil).UserGet), username, password)
}

// UserGetFromToken mocks base method
func (m *Mockdber) UserGetFromToken(token string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserGetFromToken", token)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserGetFromToken indicates an expected call of UserGetFromToken
func (mr *MockdberMockRecorder) UserGetFromToken(token interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserGetFromToken", reflect.TypeOf((*Mockdber)(nil).UserGetFromToken), token)
}

// SpaceGet mocks base method
func (m *Mockdber) SpaceGet(user user.User, spaceID string) (space.Space, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SpaceGet", user, spaceID)
	ret0, _ := ret[0].(space.Space)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// SpaceGet indicates an expected call of SpaceGet
func (mr *MockdberMockRecorder) SpaceGet(user, spaceID interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceGet", reflect.TypeOf((*Mockdber)(nil).SpaceGet), user, spaceID)
}

// ContentTypeNew mocks base method
func (m *Mockdber) ContentTypeNew(user user.User, space space.Space, name string, params []db.ContentTypeNewParam) (contenttype.ContentType, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentTypeNew", user, space, name, params)
	ret0, _ := ret[0].(contenttype.ContentType)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentTypeNew indicates an expected call of ContentTypeNew
func (mr *MockdberMockRecorder) ContentTypeNew(user, space, name, params interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTypeNew", reflect.TypeOf((*Mockdber)(nil).ContentTypeNew), user, space, name, params)
}

// ContentTypeGet mocks base method
func (m *Mockdber) ContentTypeGet(user user.User, space space.Space, contenttypeID string) (contenttype.ContentType, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentTypeGet", user, space, contenttypeID)
	ret0, _ := ret[0].(contenttype.ContentType)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentTypeGet indicates an expected call of ContentTypeGet
func (mr *MockdberMockRecorder) ContentTypeGet(user, space, contenttypeID interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTypeGet", reflect.TypeOf((*Mockdber)(nil).ContentTypeGet), user, space, contenttypeID)
}

// ContentTypeUpdate mocks base method
func (m *Mockdber) ContentTypeUpdate(user user.User, space space.Space, ct contenttype.ContentType, name string, newParams []db.ContentTypeNewParam, updateParams []db.ContentTypeUpdateParam) (contenttype.ContentType, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentTypeUpdate", user, space, ct, name, newParams, updateParams)
	ret0, _ := ret[0].(contenttype.ContentType)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentTypeUpdate indicates an expected call of ContentTypeUpdate
func (mr *MockdberMockRecorder) ContentTypeUpdate(user, space, contenttype, name, newParams, updateParams interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTypeUpdate", reflect.TypeOf((*Mockdber)(nil).ContentTypeUpdate), user, space, contenttype, name, newParams, updateParams)
}

// ContentTypeDelete mocks base method
func (m *Mockdber) ContentTypeDelete(user user.User, space space.Space, ct contenttype.ContentType) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentTypeDelete", user, space, ct)
	ret0, _ := ret[0].(error)
	return ret0
}

// ContentTypeDelete indicates an expected call of ContentTypeDelete
func (mr *MockdberMockRecorder) ContentTypeDelete(user, space, ct interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTypeDelete", reflect.TypeOf((*Mockdber)(nil).ContentTypeDelete), user, space, ct)
}

// ContentTypeSearch mocks base method
func (m *Mockdber) ContentTypeSearch(user user.User, space space.Space, query string, before int) (contenttype.ContentTypeList, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentTypeSearch", user, space, query, before)
	ret0, _ := ret[0].(contenttype.ContentTypeList)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentTypeSearch indicates an expected call of ContentTypeSearch
func (mr *MockdberMockRecorder) ContentTypeSearch(user, space, query, before interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTypeSearch", reflect.TypeOf((*Mockdber)(nil).ContentTypeSearch), user, space, query, before)
}

// ContentPerContentType mocks base method
func (m *Mockdber) ContentPerContentType(user user.User, space space.Space, ct contenttype.ContentType, before int, order db.OrderType, sortField string) (content.ContentList, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentPerContentType", user, space, ct, before, order, sortField)
	ret0, _ := ret[0].(content.ContentList)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentPerContentType indicates an expected call of ContentPerContentType
func (mr *MockdberMockRecorder) ContentPerContentType(user, space, ct, before, order, sortField interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentPerContentType", reflect.TypeOf((*Mockdber)(nil).ContentPerContentType), user, space, ct, before, order, sortField)
}