-
Notifications
You must be signed in to change notification settings - Fork 0
/
article.mock.go
65 lines (54 loc) · 2.13 KB
/
article.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
// Code generated by MockGen. DO NOT EDIT.
// Source: webook/internal/repository/article/article.go
// Package artrepomocks is a generated GoMock package.
package artrepomocks
import (
context "context"
reflect "reflect"
domain "github.com/gevinzone/basic-go/week5/webook/internal/domain"
gomock "go.uber.org/mock/gomock"
)
// MockArticleRepository is a mock of ArticleRepository interface.
type MockArticleRepository struct {
ctrl *gomock.Controller
recorder *MockArticleRepositoryMockRecorder
}
// MockArticleRepositoryMockRecorder is the mock recorder for MockArticleRepository.
type MockArticleRepositoryMockRecorder struct {
mock *MockArticleRepository
}
// NewMockArticleRepository creates a new mock instance.
func NewMockArticleRepository(ctrl *gomock.Controller) *MockArticleRepository {
mock := &MockArticleRepository{ctrl: ctrl}
mock.recorder = &MockArticleRepositoryMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockArticleRepository) EXPECT() *MockArticleRepositoryMockRecorder {
return m.recorder
}
// Create mocks base method.
func (m *MockArticleRepository) Create(ctx context.Context, art domain.Article) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", ctx, art)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Create indicates an expected call of Create.
func (mr *MockArticleRepositoryMockRecorder) Create(ctx, art interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockArticleRepository)(nil).Create), ctx, art)
}
// Update mocks base method.
func (m *MockArticleRepository) Update(ctx context.Context, art domain.Article) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", ctx, art)
ret0, _ := ret[0].(error)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockArticleRepositoryMockRecorder) Update(ctx, art interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockArticleRepository)(nil).Update), ctx, art)
}