-
Notifications
You must be signed in to change notification settings - Fork 3
/
Factory.go
45 lines (35 loc) · 1.26 KB
/
Factory.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
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
import (
mock "github.com/stretchr/testify/mock"
client "sigs.k8s.io/controller-runtime/pkg/client"
workloadcluster "github.com/SovereignCloudStack/cluster-stack-operator/pkg/workloadcluster"
)
// Factory is an autogenerated mock type for the Factory type
type Factory struct {
mock.Mock
}
// NewClient provides a mock function with given fields: name, namespace, controllerClient
func (_m *Factory) NewClient(name string, namespace string, controllerClient client.Client) workloadcluster.Client {
ret := _m.Called(name, namespace, controllerClient)
var r0 workloadcluster.Client
if rf, ok := ret.Get(0).(func(string, string, client.Client) workloadcluster.Client); ok {
r0 = rf(name, namespace, controllerClient)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(workloadcluster.Client)
}
}
return r0
}
// NewFactory creates a new instance of Factory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewFactory(t interface {
mock.TestingT
Cleanup(func())
}) *Factory {
mock := &Factory{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}