github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/label/automock/label_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  // LabelRepository is an autogenerated mock type for the LabelRepository type
    14  type LabelRepository struct {
    15  	mock.Mock
    16  }
    17  
    18  // Create provides a mock function with given fields: ctx, tenant, _a2
    19  func (_m *LabelRepository) Create(ctx context.Context, tenant string, _a2 *model.Label) error {
    20  	ret := _m.Called(ctx, tenant, _a2)
    21  
    22  	var r0 error
    23  	if rf, ok := ret.Get(0).(func(context.Context, string, *model.Label) error); ok {
    24  		r0 = rf(ctx, tenant, _a2)
    25  	} else {
    26  		r0 = ret.Error(0)
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // GetByKey provides a mock function with given fields: ctx, tenant, objectType, objectID, key
    33  func (_m *LabelRepository) GetByKey(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) (*model.Label, error) {
    34  	ret := _m.Called(ctx, tenant, objectType, objectID, key)
    35  
    36  	var r0 *model.Label
    37  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string, string) *model.Label); ok {
    38  		r0 = rf(ctx, tenant, objectType, objectID, key)
    39  	} else {
    40  		if ret.Get(0) != nil {
    41  			r0 = ret.Get(0).(*model.Label)
    42  		}
    43  	}
    44  
    45  	var r1 error
    46  	if rf, ok := ret.Get(1).(func(context.Context, string, model.LabelableObject, string, string) error); ok {
    47  		r1 = rf(ctx, tenant, objectType, objectID, key)
    48  	} else {
    49  		r1 = ret.Error(1)
    50  	}
    51  
    52  	return r0, r1
    53  }
    54  
    55  // UpdateWithVersion provides a mock function with given fields: ctx, tenant, _a2
    56  func (_m *LabelRepository) UpdateWithVersion(ctx context.Context, tenant string, _a2 *model.Label) error {
    57  	ret := _m.Called(ctx, tenant, _a2)
    58  
    59  	var r0 error
    60  	if rf, ok := ret.Get(0).(func(context.Context, string, *model.Label) error); ok {
    61  		r0 = rf(ctx, tenant, _a2)
    62  	} else {
    63  		r0 = ret.Error(0)
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // Upsert provides a mock function with given fields: ctx, tenant, _a2
    70  func (_m *LabelRepository) Upsert(ctx context.Context, tenant string, _a2 *model.Label) error {
    71  	ret := _m.Called(ctx, tenant, _a2)
    72  
    73  	var r0 error
    74  	if rf, ok := ret.Get(0).(func(context.Context, string, *model.Label) error); ok {
    75  		r0 = rf(ctx, tenant, _a2)
    76  	} else {
    77  		r0 = ret.Error(0)
    78  	}
    79  
    80  	return r0
    81  }
    82  
    83  // UpsertGlobal provides a mock function with given fields: ctx, _a1
    84  func (_m *LabelRepository) UpsertGlobal(ctx context.Context, _a1 *model.Label) error {
    85  	ret := _m.Called(ctx, _a1)
    86  
    87  	var r0 error
    88  	if rf, ok := ret.Get(0).(func(context.Context, *model.Label) error); ok {
    89  		r0 = rf(ctx, _a1)
    90  	} else {
    91  		r0 = ret.Error(0)
    92  	}
    93  
    94  	return r0
    95  }
    96  
    97  type mockConstructorTestingTNewLabelRepository interface {
    98  	mock.TestingT
    99  	Cleanup(func())
   100  }
   101  
   102  // NewLabelRepository creates a new instance of LabelRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   103  func NewLabelRepository(t mockConstructorTestingTNewLabelRepository) *LabelRepository {
   104  	mock := &LabelRepository{}
   105  	mock.Mock.Test(t)
   106  
   107  	t.Cleanup(func() { mock.AssertExpectations(t) })
   108  
   109  	return mock
   110  }