/
DependencyValidator.go
81 lines (63 loc) · 2.54 KB
/
DependencyValidator.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
// Code generated by mockery v2.20.0. DO NOT EDIT.
package mocks
import (
context "context"
core "github.com/cloudogu/cesapp-lib/core"
mock "github.com/stretchr/testify/mock"
)
// DependencyValidator is an autogenerated mock type for the DependencyValidator type
type DependencyValidator struct {
mock.Mock
}
type DependencyValidator_Expecter struct {
mock *mock.Mock
}
func (_m *DependencyValidator) EXPECT() *DependencyValidator_Expecter {
return &DependencyValidator_Expecter{mock: &_m.Mock}
}
// ValidateDependencies provides a mock function with given fields: ctx, dogu
func (_m *DependencyValidator) ValidateDependencies(ctx context.Context, dogu *core.Dogu) error {
ret := _m.Called(ctx, dogu)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *core.Dogu) error); ok {
r0 = rf(ctx, dogu)
} else {
r0 = ret.Error(0)
}
return r0
}
// DependencyValidator_ValidateDependencies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateDependencies'
type DependencyValidator_ValidateDependencies_Call struct {
*mock.Call
}
// ValidateDependencies is a helper method to define mock.On call
// - ctx context.Context
// - dogu *core.Dogu
func (_e *DependencyValidator_Expecter) ValidateDependencies(ctx interface{}, dogu interface{}) *DependencyValidator_ValidateDependencies_Call {
return &DependencyValidator_ValidateDependencies_Call{Call: _e.mock.On("ValidateDependencies", ctx, dogu)}
}
func (_c *DependencyValidator_ValidateDependencies_Call) Run(run func(ctx context.Context, dogu *core.Dogu)) *DependencyValidator_ValidateDependencies_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*core.Dogu))
})
return _c
}
func (_c *DependencyValidator_ValidateDependencies_Call) Return(_a0 error) *DependencyValidator_ValidateDependencies_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *DependencyValidator_ValidateDependencies_Call) RunAndReturn(run func(context.Context, *core.Dogu) error) *DependencyValidator_ValidateDependencies_Call {
_c.Call.Return(run)
return _c
}
type mockConstructorTestingTNewDependencyValidator interface {
mock.TestingT
Cleanup(func())
}
// NewDependencyValidator creates a new instance of DependencyValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewDependencyValidator(t mockConstructorTestingTNewDependencyValidator) *DependencyValidator {
mock := &DependencyValidator{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}