// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/opencloud-eu/libre-graph-api-go" "github.com/qsfera/server/pkg/keycloak" mock "github.com/stretchr/testify/mock" ) // NewClient creates a new instance of Client. 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 NewClient(t interface { mock.TestingT Cleanup(func()) }) *Client { mock := &Client{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // Client is an autogenerated mock type for the Client type type Client struct { mock.Mock } type Client_Expecter struct { mock *mock.Mock } func (_m *Client) EXPECT() *Client_Expecter { return &Client_Expecter{mock: &_m.Mock} } // CreateUser provides a mock function for the type Client func (_mock *Client) CreateUser(ctx context.Context, realm string, user *libregraph.User, userActions []keycloak.UserAction) (string, error) { ret := _mock.Called(ctx, realm, user, userActions) if len(ret) == 0 { panic("no return value specified for CreateUser") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, *libregraph.User, []keycloak.UserAction) (string, error)); ok { return returnFunc(ctx, realm, user, userActions) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, *libregraph.User, []keycloak.UserAction) string); ok { r0 = returnFunc(ctx, realm, user, userActions) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, *libregraph.User, []keycloak.UserAction) error); ok { r1 = returnFunc(ctx, realm, user, userActions) } else { r1 = ret.Error(1) } return r0, r1 } // Client_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser' type Client_CreateUser_Call struct { *mock.Call } // CreateUser is a helper method to define mock.On call // - ctx context.Context // - realm string // - user *libregraph.User // - userActions []keycloak.UserAction func (_e *Client_Expecter) CreateUser(ctx interface{}, realm interface{}, user interface{}, userActions interface{}) *Client_CreateUser_Call { return &Client_CreateUser_Call{Call: _e.mock.On("CreateUser", ctx, realm, user, userActions)} } func (_c *Client_CreateUser_Call) Run(run func(ctx context.Context, realm string, user *libregraph.User, userActions []keycloak.UserAction)) *Client_CreateUser_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 *libregraph.User if args[2] != nil { arg2 = args[2].(*libregraph.User) } var arg3 []keycloak.UserAction if args[3] != nil { arg3 = args[3].([]keycloak.UserAction) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *Client_CreateUser_Call) Return(s string, err error) *Client_CreateUser_Call { _c.Call.Return(s, err) return _c } func (_c *Client_CreateUser_Call) RunAndReturn(run func(ctx context.Context, realm string, user *libregraph.User, userActions []keycloak.UserAction) (string, error)) *Client_CreateUser_Call { _c.Call.Return(run) return _c } // GetPIIReport provides a mock function for the type Client func (_mock *Client) GetPIIReport(ctx context.Context, realm string, username string) (*keycloak.PIIReport, error) { ret := _mock.Called(ctx, realm, username) if len(ret) == 0 { panic("no return value specified for GetPIIReport") } var r0 *keycloak.PIIReport var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*keycloak.PIIReport, error)); ok { return returnFunc(ctx, realm, username) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *keycloak.PIIReport); ok { r0 = returnFunc(ctx, realm, username) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*keycloak.PIIReport) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, realm, username) } else { r1 = ret.Error(1) } return r0, r1 } // Client_GetPIIReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPIIReport' type Client_GetPIIReport_Call struct { *mock.Call } // GetPIIReport is a helper method to define mock.On call // - ctx context.Context // - realm string // - username string func (_e *Client_Expecter) GetPIIReport(ctx interface{}, realm interface{}, username interface{}) *Client_GetPIIReport_Call { return &Client_GetPIIReport_Call{Call: _e.mock.On("GetPIIReport", ctx, realm, username)} } func (_c *Client_GetPIIReport_Call) Run(run func(ctx context.Context, realm string, username string)) *Client_GetPIIReport_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *Client_GetPIIReport_Call) Return(pIIReport *keycloak.PIIReport, err error) *Client_GetPIIReport_Call { _c.Call.Return(pIIReport, err) return _c } func (_c *Client_GetPIIReport_Call) RunAndReturn(run func(ctx context.Context, realm string, username string) (*keycloak.PIIReport, error)) *Client_GetPIIReport_Call { _c.Call.Return(run) return _c } // GetUserByUsername provides a mock function for the type Client func (_mock *Client) GetUserByUsername(ctx context.Context, realm string, username string) (*libregraph.User, error) { ret := _mock.Called(ctx, realm, username) if len(ret) == 0 { panic("no return value specified for GetUserByUsername") } var r0 *libregraph.User var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*libregraph.User, error)); ok { return returnFunc(ctx, realm, username) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *libregraph.User); ok { r0 = returnFunc(ctx, realm, username) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*libregraph.User) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, realm, username) } else { r1 = ret.Error(1) } return r0, r1 } // Client_GetUserByUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByUsername' type Client_GetUserByUsername_Call struct { *mock.Call } // GetUserByUsername is a helper method to define mock.On call // - ctx context.Context // - realm string // - username string func (_e *Client_Expecter) GetUserByUsername(ctx interface{}, realm interface{}, username interface{}) *Client_GetUserByUsername_Call { return &Client_GetUserByUsername_Call{Call: _e.mock.On("GetUserByUsername", ctx, realm, username)} } func (_c *Client_GetUserByUsername_Call) Run(run func(ctx context.Context, realm string, username string)) *Client_GetUserByUsername_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *Client_GetUserByUsername_Call) Return(user *libregraph.User, err error) *Client_GetUserByUsername_Call { _c.Call.Return(user, err) return _c } func (_c *Client_GetUserByUsername_Call) RunAndReturn(run func(ctx context.Context, realm string, username string) (*libregraph.User, error)) *Client_GetUserByUsername_Call { _c.Call.Return(run) return _c } // SendActionsMail provides a mock function for the type Client func (_mock *Client) SendActionsMail(ctx context.Context, realm string, userID string, userActions []keycloak.UserAction) error { ret := _mock.Called(ctx, realm, userID, userActions) if len(ret) == 0 { panic("no return value specified for SendActionsMail") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []keycloak.UserAction) error); ok { r0 = returnFunc(ctx, realm, userID, userActions) } else { r0 = ret.Error(0) } return r0 } // Client_SendActionsMail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendActionsMail' type Client_SendActionsMail_Call struct { *mock.Call } // SendActionsMail is a helper method to define mock.On call // - ctx context.Context // - realm string // - userID string // - userActions []keycloak.UserAction func (_e *Client_Expecter) SendActionsMail(ctx interface{}, realm interface{}, userID interface{}, userActions interface{}) *Client_SendActionsMail_Call { return &Client_SendActionsMail_Call{Call: _e.mock.On("SendActionsMail", ctx, realm, userID, userActions)} } func (_c *Client_SendActionsMail_Call) Run(run func(ctx context.Context, realm string, userID string, userActions []keycloak.UserAction)) *Client_SendActionsMail_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 []keycloak.UserAction if args[3] != nil { arg3 = args[3].([]keycloak.UserAction) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *Client_SendActionsMail_Call) Return(err error) *Client_SendActionsMail_Call { _c.Call.Return(err) return _c } func (_c *Client_SendActionsMail_Call) RunAndReturn(run func(ctx context.Context, realm string, userID string, userActions []keycloak.UserAction) error) *Client_SendActionsMail_Call { _c.Call.Return(run) return _c }