-
Notifications
You must be signed in to change notification settings - Fork 1
/
ProductService.go
62 lines (49 loc) · 1.42 KB
/
ProductService.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
// Code generated by mockery v2.10.4. DO NOT EDIT.
package mocks
import (
domain "github.com/berkayersoyy/go-products-example-ddd/pkg/domain"
mock "github.com/stretchr/testify/mock"
)
// ProductService is an autogenerated mock type for the ProductService type
type ProductService struct {
mock.Mock
}
// AddProduct provides a mock function with given fields: product
func (_m *ProductService) AddProduct(product domain.Product) domain.Product {
ret := _m.Called(product)
var r0 domain.Product
if rf, ok := ret.Get(0).(func(domain.Product) domain.Product); ok {
r0 = rf(product)
} else {
r0 = ret.Get(0).(domain.Product)
}
return r0
}
// DeleteProduct provides a mock function with given fields: product
func (_m *ProductService) DeleteProduct(product domain.Product) {
_m.Called(product)
}
// GetAllProducts provides a mock function with given fields:
func (_m *ProductService) GetAllProducts() []domain.Product {
ret := _m.Called()
var r0 []domain.Product
if rf, ok := ret.Get(0).(func() []domain.Product); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]domain.Product)
}
}
return r0
}
// GetProductByID provides a mock function with given fields: id
func (_m *ProductService) GetProductByID(id uint) domain.Product {
ret := _m.Called(id)
var r0 domain.Product
if rf, ok := ret.Get(0).(func(uint) domain.Product); ok {
r0 = rf(id)
} else {
r0 = ret.Get(0).(domain.Product)
}
return r0
}