// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( mock "github.com/stretchr/testify/mock" ) // NewMockPortalClient creates a new instance of MockPortalClient. 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 NewMockPortalClient(t interface { mock.TestingT Cleanup(func()) }) *MockPortalClient { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockPortalClient{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockPortalClient is an autogenerated mock type for the portalClient type type MockPortalClient struct { mock.Mock } type MockPortalClient_Expecter struct { mock *mock.Mock } func (_m *MockPortalClient) EXPECT() *MockPortalClient_Expecter { return &MockPortalClient_Expecter{mock: &_m.Mock} } // Close provides a mock function for the type MockPortalClient func (_mock *MockPortalClient) Close() error { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error if returnFunc, ok := ret.Get(0).(func() error); ok { r0 = returnFunc() } else { r0 = ret.Error(0) } return r0 } // MockPortalClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockPortalClient_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockPortalClient_Expecter) Close() *MockPortalClient_Close_Call { return &MockPortalClient_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockPortalClient_Close_Call) Run(run func()) *MockPortalClient_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockPortalClient_Close_Call) Return(err error) *MockPortalClient_Close_Call { _c.Call.Return(err) return _c } func (_c *MockPortalClient_Close_Call) RunAndReturn(run func() error) *MockPortalClient_Close_Call { _c.Call.Return(run) return _c } // CloseRequest provides a mock function for the type MockPortalClient func (_mock *MockPortalClient) CloseRequest(handle string) error { ret := _mock.Called(handle) if len(ret) == 0 { panic("no return value specified for CloseRequest") } var r0 error if returnFunc, ok := ret.Get(0).(func(string) error); ok { r0 = returnFunc(handle) } else { r0 = ret.Error(0) } return r0 } // MockPortalClient_CloseRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseRequest' type MockPortalClient_CloseRequest_Call struct { *mock.Call } // CloseRequest is a helper method to define mock.On call // - handle string func (_e *MockPortalClient_Expecter) CloseRequest(handle any) *MockPortalClient_CloseRequest_Call { return &MockPortalClient_CloseRequest_Call{Call: _e.mock.On("CloseRequest", handle)} } func (_c *MockPortalClient_CloseRequest_Call) Run(run func(handle string)) *MockPortalClient_CloseRequest_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 string if args[0] != nil { arg0 = args[0].(string) } run( arg0, ) }) return _c } func (_c *MockPortalClient_CloseRequest_Call) Return(err error) *MockPortalClient_CloseRequest_Call { _c.Call.Return(err) return _c } func (_c *MockPortalClient_CloseRequest_Call) RunAndReturn(run func(handle string) error) *MockPortalClient_CloseRequest_Call { _c.Call.Return(run) return _c } // Inhibit provides a mock function for the type MockPortalClient func (_mock *MockPortalClient) Inhibit(reason string) (string, error) { ret := _mock.Called(reason) if len(ret) == 0 { panic("no return value specified for Inhibit") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { return returnFunc(reason) } if returnFunc, ok := ret.Get(0).(func(string) string); ok { r0 = returnFunc(reason) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(string) error); ok { r1 = returnFunc(reason) } else { r1 = ret.Error(1) } return r0, r1 } // MockPortalClient_Inhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inhibit' type MockPortalClient_Inhibit_Call struct { *mock.Call } // Inhibit is a helper method to define mock.On call // - reason string func (_e *MockPortalClient_Expecter) Inhibit(reason any) *MockPortalClient_Inhibit_Call { return &MockPortalClient_Inhibit_Call{Call: _e.mock.On("Inhibit", reason)} } func (_c *MockPortalClient_Inhibit_Call) Run(run func(reason string)) *MockPortalClient_Inhibit_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 string if args[0] != nil { arg0 = args[0].(string) } run( arg0, ) }) return _c } func (_c *MockPortalClient_Inhibit_Call) Return(s string, err error) *MockPortalClient_Inhibit_Call { _c.Call.Return(s, err) return _c } func (_c *MockPortalClient_Inhibit_Call) RunAndReturn(run func(reason string) (string, error)) *MockPortalClient_Inhibit_Call { _c.Call.Return(run) return _c } // Version provides a mock function for the type MockPortalClient func (_mock *MockPortalClient) Version() (uint32, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Version") } var r0 uint32 var r1 error if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() uint32); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(uint32) } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockPortalClient_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version' type MockPortalClient_Version_Call struct { *mock.Call } // Version is a helper method to define mock.On call func (_e *MockPortalClient_Expecter) Version() *MockPortalClient_Version_Call { return &MockPortalClient_Version_Call{Call: _e.mock.On("Version")} } func (_c *MockPortalClient_Version_Call) Run(run func()) *MockPortalClient_Version_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockPortalClient_Version_Call) Return(v uint32, err error) *MockPortalClient_Version_Call { _c.Call.Return(v, err) return _c } func (_c *MockPortalClient_Version_Call) RunAndReturn(run func() (uint32, error)) *MockPortalClient_Version_Call { _c.Call.Return(run) return _c }