| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- // Code generated by mockery; DO NOT EDIT.
- // github.com/vektra/mockery
- // template: testify
- package icq_legacy
- import (
- "context"
- "github.com/mk6i/open-oscar-server/state"
- mock "github.com/stretchr/testify/mock"
- )
- // newMockRelationshipFetcher creates a new instance of mockRelationshipFetcher. 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 newMockRelationshipFetcher(t interface {
- mock.TestingT
- Cleanup(func())
- }) *mockRelationshipFetcher {
- mock := &mockRelationshipFetcher{}
- mock.Mock.Test(t)
- t.Cleanup(func() { mock.AssertExpectations(t) })
- return mock
- }
- // mockRelationshipFetcher is an autogenerated mock type for the RelationshipFetcher type
- type mockRelationshipFetcher struct {
- mock.Mock
- }
- type mockRelationshipFetcher_Expecter struct {
- mock *mock.Mock
- }
- func (_m *mockRelationshipFetcher) EXPECT() *mockRelationshipFetcher_Expecter {
- return &mockRelationshipFetcher_Expecter{mock: &_m.Mock}
- }
- // AllRelationships provides a mock function for the type mockRelationshipFetcher
- func (_mock *mockRelationshipFetcher) AllRelationships(ctx context.Context, me state.IdentScreenName, filter []state.IdentScreenName) ([]state.Relationship, error) {
- ret := _mock.Called(ctx, me, filter)
- if len(ret) == 0 {
- panic("no return value specified for AllRelationships")
- }
- var r0 []state.Relationship
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName, []state.IdentScreenName) ([]state.Relationship, error)); ok {
- return returnFunc(ctx, me, filter)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName, []state.IdentScreenName) []state.Relationship); ok {
- r0 = returnFunc(ctx, me, filter)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).([]state.Relationship)
- }
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, state.IdentScreenName, []state.IdentScreenName) error); ok {
- r1 = returnFunc(ctx, me, filter)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockRelationshipFetcher_AllRelationships_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllRelationships'
- type mockRelationshipFetcher_AllRelationships_Call struct {
- *mock.Call
- }
- // AllRelationships is a helper method to define mock.On call
- // - ctx context.Context
- // - me state.IdentScreenName
- // - filter []state.IdentScreenName
- func (_e *mockRelationshipFetcher_Expecter) AllRelationships(ctx interface{}, me interface{}, filter interface{}) *mockRelationshipFetcher_AllRelationships_Call {
- return &mockRelationshipFetcher_AllRelationships_Call{Call: _e.mock.On("AllRelationships", ctx, me, filter)}
- }
- func (_c *mockRelationshipFetcher_AllRelationships_Call) Run(run func(ctx context.Context, me state.IdentScreenName, filter []state.IdentScreenName)) *mockRelationshipFetcher_AllRelationships_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 state.IdentScreenName
- if args[1] != nil {
- arg1 = args[1].(state.IdentScreenName)
- }
- var arg2 []state.IdentScreenName
- if args[2] != nil {
- arg2 = args[2].([]state.IdentScreenName)
- }
- run(
- arg0,
- arg1,
- arg2,
- )
- })
- return _c
- }
- func (_c *mockRelationshipFetcher_AllRelationships_Call) Return(relationships []state.Relationship, err error) *mockRelationshipFetcher_AllRelationships_Call {
- _c.Call.Return(relationships, err)
- return _c
- }
- func (_c *mockRelationshipFetcher_AllRelationships_Call) RunAndReturn(run func(ctx context.Context, me state.IdentScreenName, filter []state.IdentScreenName) ([]state.Relationship, error)) *mockRelationshipFetcher_AllRelationships_Call {
- _c.Call.Return(run)
- return _c
- }
- // Relationship provides a mock function for the type mockRelationshipFetcher
- func (_mock *mockRelationshipFetcher) Relationship(ctx context.Context, me state.IdentScreenName, them state.IdentScreenName) (state.Relationship, error) {
- ret := _mock.Called(ctx, me, them)
- if len(ret) == 0 {
- panic("no return value specified for Relationship")
- }
- var r0 state.Relationship
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName, state.IdentScreenName) (state.Relationship, error)); ok {
- return returnFunc(ctx, me, them)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName, state.IdentScreenName) state.Relationship); ok {
- r0 = returnFunc(ctx, me, them)
- } else {
- r0 = ret.Get(0).(state.Relationship)
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, state.IdentScreenName, state.IdentScreenName) error); ok {
- r1 = returnFunc(ctx, me, them)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockRelationshipFetcher_Relationship_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Relationship'
- type mockRelationshipFetcher_Relationship_Call struct {
- *mock.Call
- }
- // Relationship is a helper method to define mock.On call
- // - ctx context.Context
- // - me state.IdentScreenName
- // - them state.IdentScreenName
- func (_e *mockRelationshipFetcher_Expecter) Relationship(ctx interface{}, me interface{}, them interface{}) *mockRelationshipFetcher_Relationship_Call {
- return &mockRelationshipFetcher_Relationship_Call{Call: _e.mock.On("Relationship", ctx, me, them)}
- }
- func (_c *mockRelationshipFetcher_Relationship_Call) Run(run func(ctx context.Context, me state.IdentScreenName, them state.IdentScreenName)) *mockRelationshipFetcher_Relationship_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 state.IdentScreenName
- if args[1] != nil {
- arg1 = args[1].(state.IdentScreenName)
- }
- var arg2 state.IdentScreenName
- if args[2] != nil {
- arg2 = args[2].(state.IdentScreenName)
- }
- run(
- arg0,
- arg1,
- arg2,
- )
- })
- return _c
- }
- func (_c *mockRelationshipFetcher_Relationship_Call) Return(relationship state.Relationship, err error) *mockRelationshipFetcher_Relationship_Call {
- _c.Call.Return(relationship, err)
- return _c
- }
- func (_c *mockRelationshipFetcher_Relationship_Call) RunAndReturn(run func(ctx context.Context, me state.IdentScreenName, them state.IdentScreenName) (state.Relationship, error)) *mockRelationshipFetcher_Relationship_Call {
- _c.Call.Return(run)
- return _c
- }
|