403Webshell
Server IP : 157.230.181.24  /  Your IP : 216.73.217.11
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64
User :  ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/vhosts/ceagon/open-oscar-server/foodgroup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/ceagon/open-oscar-server/foodgroup/mock_relationship_fetcher_test.go
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package foodgroup

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
}

Youez - 2016 - github.com/yon3zu
LinuXploit