github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/destination/automock/application_repository.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	model "github.com/kyma-incubator/compass/components/director/internal/model"
    11  )
    12  
    13  // ApplicationRepository is an autogenerated mock type for the applicationRepository type
    14  type ApplicationRepository struct {
    15  	mock.Mock
    16  }
    17  
    18  // GetByID provides a mock function with given fields: ctx, tenant, id
    19  func (_m *ApplicationRepository) GetByID(ctx context.Context, tenant string, id string) (*model.Application, error) {
    20  	ret := _m.Called(ctx, tenant, id)
    21  
    22  	var r0 *model.Application
    23  	if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.Application); ok {
    24  		r0 = rf(ctx, tenant, id)
    25  	} else {
    26  		if ret.Get(0) != nil {
    27  			r0 = ret.Get(0).(*model.Application)
    28  		}
    29  	}
    30  
    31  	var r1 error
    32  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    33  		r1 = rf(ctx, tenant, id)
    34  	} else {
    35  		r1 = ret.Error(1)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  // ListByScenariosNoPaging provides a mock function with given fields: ctx, tenant, scenarios
    42  func (_m *ApplicationRepository) ListByScenariosNoPaging(ctx context.Context, tenant string, scenarios []string) ([]*model.Application, error) {
    43  	ret := _m.Called(ctx, tenant, scenarios)
    44  
    45  	var r0 []*model.Application
    46  	if rf, ok := ret.Get(0).(func(context.Context, string, []string) []*model.Application); ok {
    47  		r0 = rf(ctx, tenant, scenarios)
    48  	} else {
    49  		if ret.Get(0) != nil {
    50  			r0 = ret.Get(0).([]*model.Application)
    51  		}
    52  	}
    53  
    54  	var r1 error
    55  	if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
    56  		r1 = rf(ctx, tenant, scenarios)
    57  	} else {
    58  		r1 = ret.Error(1)
    59  	}
    60  
    61  	return r0, r1
    62  }
    63  
    64  // OwnerExists provides a mock function with given fields: ctx, tenant, id
    65  func (_m *ApplicationRepository) OwnerExists(ctx context.Context, tenant string, id string) (bool, error) {
    66  	ret := _m.Called(ctx, tenant, id)
    67  
    68  	var r0 bool
    69  	if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
    70  		r0 = rf(ctx, tenant, id)
    71  	} else {
    72  		r0 = ret.Get(0).(bool)
    73  	}
    74  
    75  	var r1 error
    76  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    77  		r1 = rf(ctx, tenant, id)
    78  	} else {
    79  		r1 = ret.Error(1)
    80  	}
    81  
    82  	return r0, r1
    83  }
    84  
    85  type mockConstructorTestingTNewApplicationRepository interface {
    86  	mock.TestingT
    87  	Cleanup(func())
    88  }
    89  
    90  // NewApplicationRepository creates a new instance of ApplicationRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    91  func NewApplicationRepository(t mockConstructorTestingTNewApplicationRepository) *ApplicationRepository {
    92  	mock := &ApplicationRepository{}
    93  	mock.Mock.Test(t)
    94  
    95  	t.Cleanup(func() { mock.AssertExpectations(t) })
    96  
    97  	return mock
    98  }