github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/formationmapping/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  // OwnerExists provides a mock function with given fields: ctx, tenant, id
    42  func (_m *ApplicationRepository) OwnerExists(ctx context.Context, tenant string, id string) (bool, error) {
    43  	ret := _m.Called(ctx, tenant, id)
    44  
    45  	var r0 bool
    46  	if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
    47  		r0 = rf(ctx, tenant, id)
    48  	} else {
    49  		r0 = ret.Get(0).(bool)
    50  	}
    51  
    52  	var r1 error
    53  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    54  		r1 = rf(ctx, tenant, id)
    55  	} else {
    56  		r1 = ret.Error(1)
    57  	}
    58  
    59  	return r0, r1
    60  }
    61  
    62  type mockConstructorTestingTNewApplicationRepository interface {
    63  	mock.TestingT
    64  	Cleanup(func())
    65  }
    66  
    67  // 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.
    68  func NewApplicationRepository(t mockConstructorTestingTNewApplicationRepository) *ApplicationRepository {
    69  	mock := &ApplicationRepository{}
    70  	mock.Mock.Test(t)
    71  
    72  	t.Cleanup(func() { mock.AssertExpectations(t) })
    73  
    74  	return mock
    75  }