github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/systemfetcher/automock/systems_api_client.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 sync "sync" 8 9 mock "github.com/stretchr/testify/mock" 10 11 systemfetcher "github.com/kyma-incubator/compass/components/director/internal/systemfetcher" 12 ) 13 14 // SystemsAPIClient is an autogenerated mock type for the systemsAPIClient type 15 type SystemsAPIClient struct { 16 mock.Mock 17 } 18 19 // FetchSystemsForTenant provides a mock function with given fields: ctx, tenant, mutex 20 func (_m *SystemsAPIClient) FetchSystemsForTenant(ctx context.Context, tenant string, mutex *sync.Mutex) ([]systemfetcher.System, error) { 21 ret := _m.Called(ctx, tenant, mutex) 22 23 var r0 []systemfetcher.System 24 if rf, ok := ret.Get(0).(func(context.Context, string, *sync.Mutex) []systemfetcher.System); ok { 25 r0 = rf(ctx, tenant, mutex) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).([]systemfetcher.System) 29 } 30 } 31 32 var r1 error 33 if rf, ok := ret.Get(1).(func(context.Context, string, *sync.Mutex) error); ok { 34 r1 = rf(ctx, tenant, mutex) 35 } else { 36 r1 = ret.Error(1) 37 } 38 39 return r0, r1 40 } 41 42 type mockConstructorTestingTNewSystemsAPIClient interface { 43 mock.TestingT 44 Cleanup(func()) 45 } 46 47 // NewSystemsAPIClient creates a new instance of SystemsAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 48 func NewSystemsAPIClient(t mockConstructorTestingTNewSystemsAPIClient) *SystemsAPIClient { 49 mock := &SystemsAPIClient{} 50 mock.Mock.Test(t) 51 52 t.Cleanup(func() { mock.AssertExpectations(t) }) 53 54 return mock 55 }