// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewOIDCKeyService creates a new instance of OIDCKeyService. 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 NewOIDCKeyService(t interface { mock.TestingT Cleanup(func()) }) *OIDCKeyService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &OIDCKeyService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // OIDCKeyService is an autogenerated mock type for the OIDCKeyService type type OIDCKeyService struct { mock.Mock } type OIDCKeyService_Expecter struct { mock *mock.Mock } func (_m *OIDCKeyService) EXPECT() *OIDCKeyService_Expecter { return &OIDCKeyService_Expecter{mock: &_m.Mock} } // RotateKey provides a mock function for the type OIDCKeyService func (_mock *OIDCKeyService) RotateKey(ctx context.Context, p domain.Principal) (ports.OIDCRotation, error) { ret := _mock.Called(ctx, p) if len(ret) == 0 { panic("no return value specified for RotateKey") } var r0 ports.OIDCRotation var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) (ports.OIDCRotation, error)); ok { return returnFunc(ctx, p) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) ports.OIDCRotation); ok { r0 = returnFunc(ctx, p) } else { r0 = ret.Get(0).(ports.OIDCRotation) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok { r1 = returnFunc(ctx, p) } else { r1 = ret.Error(1) } return r0, r1 } // OIDCKeyService_RotateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RotateKey' type OIDCKeyService_RotateKey_Call struct { *mock.Call } // RotateKey is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal func (_e *OIDCKeyService_Expecter) RotateKey(ctx any, p any) *OIDCKeyService_RotateKey_Call { return &OIDCKeyService_RotateKey_Call{Call: _e.mock.On("RotateKey", ctx, p)} } func (_c *OIDCKeyService_RotateKey_Call) Run(run func(ctx context.Context, p domain.Principal)) *OIDCKeyService_RotateKey_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } run( arg0, arg1, ) }) return _c } func (_c *OIDCKeyService_RotateKey_Call) Return(oIDCRotation ports.OIDCRotation, err error) *OIDCKeyService_RotateKey_Call { _c.Call.Return(oIDCRotation, err) return _c } func (_c *OIDCKeyService_RotateKey_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) (ports.OIDCRotation, error)) *OIDCKeyService_RotateKey_Call { _c.Call.Return(run) return _c }