/
mock_Interface.go
144 lines (111 loc) 路 3.63 KB
/
mock_Interface.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
138
139
140
141
142
143
144
// Code generated by mockery v2.15.0. DO NOT EDIT.
package studentservice
import (
context "context"
ent "github.com/naofel1/api-golang-template/internal/ent"
mock "github.com/stretchr/testify/mock"
pagination "github.com/naofel1/api-golang-template/pkg/pagination"
)
// MockInterface is an autogenerated mock type for the Interface type
type MockInterface struct {
mock.Mock
}
// DeleteStudent provides a mock function with given fields: ctx, u
func (_m *MockInterface) DeleteStudent(ctx context.Context, u *ent.Student) error {
ret := _m.Called(ctx, u)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Student) error); ok {
r0 = rf(ctx, u)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetStudent provides a mock function with given fields: ctx, u
func (_m *MockInterface) GetStudent(ctx context.Context, u *ent.Student) error {
ret := _m.Called(ctx, u)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Student) error); ok {
r0 = rf(ctx, u)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetStudentFromLogin provides a mock function with given fields: ctx, u
func (_m *MockInterface) GetStudentFromLogin(ctx context.Context, u *ent.Student) error {
ret := _m.Called(ctx, u)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Student) error); ok {
r0 = rf(ctx, u)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetStudentsWithPagination provides a mock function with given fields: ctx, u, _a2
func (_m *MockInterface) GetStudentsWithPagination(ctx context.Context, u *ent.Students, _a2 *pagination.Front) error {
ret := _m.Called(ctx, u, _a2)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Students, *pagination.Front) error); ok {
r0 = rf(ctx, u, _a2)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetStudentsWithSearchWithPagination provides a mock function with given fields: ctx, u, us, _a3
func (_m *MockInterface) GetStudentsWithSearchWithPagination(ctx context.Context, u *ent.Students, us *ent.Student, _a3 *pagination.Front) error {
ret := _m.Called(ctx, u, us, _a3)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Students, *ent.Student, *pagination.Front) error); ok {
r0 = rf(ctx, u, us, _a3)
} else {
r0 = ret.Error(0)
}
return r0
}
// ModifyProfile provides a mock function with given fields: ctx, u
func (_m *MockInterface) ModifyProfile(ctx context.Context, u *ent.Student) error {
ret := _m.Called(ctx, u)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Student) error); ok {
r0 = rf(ctx, u)
} else {
r0 = ret.Error(0)
}
return r0
}
// Signin provides a mock function with given fields: ctx, u
func (_m *MockInterface) Signin(ctx context.Context, u *ent.Student) error {
ret := _m.Called(ctx, u)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Student) error); ok {
r0 = rf(ctx, u)
} else {
r0 = ret.Error(0)
}
return r0
}
// Signup provides a mock function with given fields: ctx, u
func (_m *MockInterface) Signup(ctx context.Context, u *ent.Student) error {
ret := _m.Called(ctx, u)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ent.Student) error); ok {
r0 = rf(ctx, u)
} else {
r0 = ret.Error(0)
}
return r0
}
type mockConstructorTestingTNewMockInterface interface {
mock.TestingT
Cleanup(func())
}
// NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface {
mock := &MockInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}