/
inventory.go
68 lines (58 loc) · 2.27 KB
/
inventory.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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./inventory.go
// Package mock_inventory is a generated GoMock package.
package mock_inventory
import (
gomock "github.com/golang/mock/gomock"
store "github.com/mimatache/go-shop/pkg/products/store"
reflect "reflect"
)
// MockUnderlyingStore is a mock of UnderlyingStore interface
type MockUnderlyingStore struct {
ctrl *gomock.Controller
recorder *MockUnderlyingStoreMockRecorder
}
// MockUnderlyingStoreMockRecorder is the mock recorder for MockUnderlyingStore
type MockUnderlyingStoreMockRecorder struct {
mock *MockUnderlyingStore
}
// NewMockUnderlyingStore creates a new mock instance
func NewMockUnderlyingStore(ctrl *gomock.Controller) *MockUnderlyingStore {
mock := &MockUnderlyingStore{ctrl: ctrl}
mock.recorder = &MockUnderlyingStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockUnderlyingStore) EXPECT() *MockUnderlyingStoreMockRecorder {
return m.recorder
}
// GetProductByID mocks base method
func (m *MockUnderlyingStore) GetProductByID(ID uint) (*store.Product, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProductByID", ID)
ret0, _ := ret[0].(*store.Product)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetProductByID indicates an expected call of GetProductByID
func (mr *MockUnderlyingStoreMockRecorder) GetProductByID(ID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProductByID", reflect.TypeOf((*MockUnderlyingStore)(nil).GetProductByID), ID)
}
// SetProducts mocks base method
func (m *MockUnderlyingStore) SetProducts(products ...*store.Product) (*store.ProductTransaction, error) {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range products {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SetProducts", varargs...)
ret0, _ := ret[0].(*store.ProductTransaction)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SetProducts indicates an expected call of SetProducts
func (mr *MockUnderlyingStoreMockRecorder) SetProducts(products ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProducts", reflect.TypeOf((*MockUnderlyingStore)(nil).SetProducts), products...)
}