func (c *MockClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error {
	return c.MockPatch(ctx, obj, patch, opts...)
}
Patch calls MockClient's MockPatch function.
package test
import (
	"context"
	"k8s.io/apimachinery/pkg/api/meta"
	"k8s.io/apimachinery/pkg/runtime"
	"sigs.k8s.io/controller-runtime/pkg/client"
)
var _ client.Client = &MockClient{}
type MockGetFn func(ctx context.Context, key client.ObjectKey, obj client.Object) error
type MockListFn func(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
type MockCreateFn func(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
type MockDeleteFn func(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
type MockDeleteAllOfFn func(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
type MockUpdateFn func(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type MockPatchFn func(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
type MockStatusUpdateFn func(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type MockStatusPatchFn func(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
type ObjectFn func(obj client.Object) error
type ObjectListFn func(obj client.ObjectList) error
func NewMockGetFn(err error, ofn ...ObjectFn) MockGetFn {
	return func(_ context.Context, _ client.ObjectKey, obj client.Object) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockListFn(err error, ofn ...ObjectListFn) MockListFn {
	return func(_ context.Context, obj client.ObjectList, _ ...client.ListOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockCreateFn(err error, ofn ...ObjectFn) MockCreateFn {
	return func(_ context.Context, obj client.Object, opts ...client.CreateOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockDeleteFn(err error, ofn ...ObjectFn) MockDeleteFn {
	return func(_ context.Context, obj client.Object, _ ...client.DeleteOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockDeleteAllOfFn(err error, ofn ...ObjectFn) MockDeleteAllOfFn {
	return func(_ context.Context, obj client.Object, _ ...client.DeleteAllOfOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockUpdateFn(err error, ofn ...ObjectFn) MockUpdateFn {
	return func(_ context.Context, obj client.Object, _ ...client.UpdateOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockPatchFn(err error, ofn ...ObjectFn) MockPatchFn {
	return func(_ context.Context, obj client.Object, _ client.Patch, _ ...client.PatchOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockStatusUpdateFn(err error, ofn ...ObjectFn) MockStatusUpdateFn {
	return func(_ context.Context, obj client.Object, _ ...client.UpdateOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
func NewMockStatusPatchFn(err error, ofn ...ObjectFn) MockStatusPatchFn {
	return func(_ context.Context, obj client.Object, _ client.Patch, _ ...client.PatchOption) error {
		for _, fn := range ofn {
			if err := fn(obj); err != nil {
				return err
			}
		}
		return err
	}
}
type MockClient struct {
	MockGet          MockGetFn
	MockList         MockListFn
	MockCreate       MockCreateFn
	MockDelete       MockDeleteFn
	MockDeleteAllOf  MockDeleteAllOfFn
	MockUpdate       MockUpdateFn
	MockPatch        MockPatchFn
	MockStatusUpdate MockStatusUpdateFn
	MockStatusPatch  MockStatusPatchFn
}
func NewMockClient() *MockClient {
	return &MockClient{
		MockGet:          NewMockGetFn(nil),
		MockList:         NewMockListFn(nil),
		MockCreate:       NewMockCreateFn(nil),
		MockDelete:       NewMockDeleteFn(nil),
		MockDeleteAllOf:  NewMockDeleteAllOfFn(nil),
		MockUpdate:       NewMockUpdateFn(nil),
		MockPatch:        NewMockPatchFn(nil),
		MockStatusUpdate: NewMockStatusUpdateFn(nil),
		MockStatusPatch:  NewMockStatusPatchFn(nil),
	}
}
func (c *MockClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error {
	return c.MockGet(ctx, key, obj)
}
func (c *MockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error {
	return c.MockList(ctx, list, opts...)
}
func (c *MockClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error {
	return c.MockCreate(ctx, obj, opts...)
}
func (c *MockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error {
	return c.MockDelete(ctx, obj, opts...)
}
func (c *MockClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error {
	return c.MockDeleteAllOf(ctx, obj, opts...)
}
func (c *MockClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error {
	return c.MockUpdate(ctx, obj, opts...)
}