// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package webapi import ( "context" mock "github.com/stretchr/testify/mock" ) // newMockSessionResolver creates a new instance of mockSessionResolver. 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 newMockSessionResolver(t interface { mock.TestingT Cleanup(func()) }) *mockSessionResolver { mock := &mockSessionResolver{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // mockSessionResolver is an autogenerated mock type for the SessionResolver type type mockSessionResolver struct { mock.Mock } type mockSessionResolver_Expecter struct { mock *mock.Mock } func (_m *mockSessionResolver) EXPECT() *mockSessionResolver_Expecter { return &mockSessionResolver_Expecter{mock: &_m.Mock} } // GetSession provides a mock function for the type mockSessionResolver func (_mock *mockSessionResolver) GetSession(ctx context.Context, aimsid string) (*Session, error) { ret := _mock.Called(ctx, aimsid) if len(ret) == 0 { panic("no return value specified for GetSession") } var r0 *Session var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*Session, error)); ok { return returnFunc(ctx, aimsid) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) *Session); ok { r0 = returnFunc(ctx, aimsid) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*Session) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, aimsid) } else { r1 = ret.Error(1) } return r0, r1 } // mockSessionResolver_GetSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSession' type mockSessionResolver_GetSession_Call struct { *mock.Call } // GetSession is a helper method to define mock.On call // - ctx context.Context // - aimsid string func (_e *mockSessionResolver_Expecter) GetSession(ctx interface{}, aimsid interface{}) *mockSessionResolver_GetSession_Call { return &mockSessionResolver_GetSession_Call{Call: _e.mock.On("GetSession", ctx, aimsid)} } func (_c *mockSessionResolver_GetSession_Call) Run(run func(ctx context.Context, aimsid string)) *mockSessionResolver_GetSession_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) } run( arg0, arg1, ) }) return _c } func (_c *mockSessionResolver_GetSession_Call) Return(session *Session, err error) *mockSessionResolver_GetSession_Call { _c.Call.Return(session, err) return _c } func (_c *mockSessionResolver_GetSession_Call) RunAndReturn(run func(ctx context.Context, aimsid string) (*Session, error)) *mockSessionResolver_GetSession_Call { _c.Call.Return(run) return _c } // TouchSession provides a mock function for the type mockSessionResolver func (_mock *mockSessionResolver) TouchSession(ctx context.Context, aimsid string) error { ret := _mock.Called(ctx, aimsid) if len(ret) == 0 { panic("no return value specified for TouchSession") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, aimsid) } else { r0 = ret.Error(0) } return r0 } // mockSessionResolver_TouchSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TouchSession' type mockSessionResolver_TouchSession_Call struct { *mock.Call } // TouchSession is a helper method to define mock.On call // - ctx context.Context // - aimsid string func (_e *mockSessionResolver_Expecter) TouchSession(ctx interface{}, aimsid interface{}) *mockSessionResolver_TouchSession_Call { return &mockSessionResolver_TouchSession_Call{Call: _e.mock.On("TouchSession", ctx, aimsid)} } func (_c *mockSessionResolver_TouchSession_Call) Run(run func(ctx context.Context, aimsid string)) *mockSessionResolver_TouchSession_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) } run( arg0, arg1, ) }) return _c } func (_c *mockSessionResolver_TouchSession_Call) Return(err error) *mockSessionResolver_TouchSession_Call { _c.Call.Return(err) return _c } func (_c *mockSessionResolver_TouchSession_Call) RunAndReturn(run func(ctx context.Context, aimsid string) error) *mockSessionResolver_TouchSession_Call { _c.Call.Return(run) return _c }