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

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	model "github.com/kyma-incubator/compass/components/director/internal/model"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	resource "github.com/kyma-incubator/compass/components/director/pkg/resource"
    12  )
    13  
    14  // BundleRepository is an autogenerated mock type for the BundleRepository type
    15  type BundleRepository struct {
    16  	mock.Mock
    17  }
    18  
    19  // Create provides a mock function with given fields: ctx, tenant, item
    20  func (_m *BundleRepository) Create(ctx context.Context, tenant string, item *model.Bundle) error {
    21  	ret := _m.Called(ctx, tenant, item)
    22  
    23  	var r0 error
    24  	if rf, ok := ret.Get(0).(func(context.Context, string, *model.Bundle) error); ok {
    25  		r0 = rf(ctx, tenant, item)
    26  	} else {
    27  		r0 = ret.Error(0)
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // CreateGlobal provides a mock function with given fields: ctx, _a1
    34  func (_m *BundleRepository) CreateGlobal(ctx context.Context, _a1 *model.Bundle) error {
    35  	ret := _m.Called(ctx, _a1)
    36  
    37  	var r0 error
    38  	if rf, ok := ret.Get(0).(func(context.Context, *model.Bundle) error); ok {
    39  		r0 = rf(ctx, _a1)
    40  	} else {
    41  		r0 = ret.Error(0)
    42  	}
    43  
    44  	return r0
    45  }
    46  
    47  // Delete provides a mock function with given fields: ctx, tenant, id
    48  func (_m *BundleRepository) Delete(ctx context.Context, tenant string, id string) error {
    49  	ret := _m.Called(ctx, tenant, id)
    50  
    51  	var r0 error
    52  	if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
    53  		r0 = rf(ctx, tenant, id)
    54  	} else {
    55  		r0 = ret.Error(0)
    56  	}
    57  
    58  	return r0
    59  }
    60  
    61  // DeleteGlobal provides a mock function with given fields: ctx, id
    62  func (_m *BundleRepository) DeleteGlobal(ctx context.Context, id string) error {
    63  	ret := _m.Called(ctx, id)
    64  
    65  	var r0 error
    66  	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
    67  		r0 = rf(ctx, id)
    68  	} else {
    69  		r0 = ret.Error(0)
    70  	}
    71  
    72  	return r0
    73  }
    74  
    75  // Exists provides a mock function with given fields: ctx, tenant, id
    76  func (_m *BundleRepository) Exists(ctx context.Context, tenant string, id string) (bool, error) {
    77  	ret := _m.Called(ctx, tenant, id)
    78  
    79  	var r0 bool
    80  	if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
    81  		r0 = rf(ctx, tenant, id)
    82  	} else {
    83  		r0 = ret.Get(0).(bool)
    84  	}
    85  
    86  	var r1 error
    87  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    88  		r1 = rf(ctx, tenant, id)
    89  	} else {
    90  		r1 = ret.Error(1)
    91  	}
    92  
    93  	return r0, r1
    94  }
    95  
    96  // GetByID provides a mock function with given fields: ctx, tenant, id
    97  func (_m *BundleRepository) GetByID(ctx context.Context, tenant string, id string) (*model.Bundle, error) {
    98  	ret := _m.Called(ctx, tenant, id)
    99  
   100  	var r0 *model.Bundle
   101  	if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.Bundle); ok {
   102  		r0 = rf(ctx, tenant, id)
   103  	} else {
   104  		if ret.Get(0) != nil {
   105  			r0 = ret.Get(0).(*model.Bundle)
   106  		}
   107  	}
   108  
   109  	var r1 error
   110  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
   111  		r1 = rf(ctx, tenant, id)
   112  	} else {
   113  		r1 = ret.Error(1)
   114  	}
   115  
   116  	return r0, r1
   117  }
   118  
   119  // GetByIDGlobal provides a mock function with given fields: ctx, id
   120  func (_m *BundleRepository) GetByIDGlobal(ctx context.Context, id string) (*model.Bundle, error) {
   121  	ret := _m.Called(ctx, id)
   122  
   123  	var r0 *model.Bundle
   124  	if rf, ok := ret.Get(0).(func(context.Context, string) *model.Bundle); ok {
   125  		r0 = rf(ctx, id)
   126  	} else {
   127  		if ret.Get(0) != nil {
   128  			r0 = ret.Get(0).(*model.Bundle)
   129  		}
   130  	}
   131  
   132  	var r1 error
   133  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
   134  		r1 = rf(ctx, id)
   135  	} else {
   136  		r1 = ret.Error(1)
   137  	}
   138  
   139  	return r0, r1
   140  }
   141  
   142  // GetForApplication provides a mock function with given fields: ctx, tenant, id, applicationID
   143  func (_m *BundleRepository) GetForApplication(ctx context.Context, tenant string, id string, applicationID string) (*model.Bundle, error) {
   144  	ret := _m.Called(ctx, tenant, id, applicationID)
   145  
   146  	var r0 *model.Bundle
   147  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.Bundle); ok {
   148  		r0 = rf(ctx, tenant, id, applicationID)
   149  	} else {
   150  		if ret.Get(0) != nil {
   151  			r0 = ret.Get(0).(*model.Bundle)
   152  		}
   153  	}
   154  
   155  	var r1 error
   156  	if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
   157  		r1 = rf(ctx, tenant, id, applicationID)
   158  	} else {
   159  		r1 = ret.Error(1)
   160  	}
   161  
   162  	return r0, r1
   163  }
   164  
   165  // ListByApplicationIDs provides a mock function with given fields: ctx, tenantID, applicationIDs, pageSize, cursor
   166  func (_m *BundleRepository) ListByApplicationIDs(ctx context.Context, tenantID string, applicationIDs []string, pageSize int, cursor string) ([]*model.BundlePage, error) {
   167  	ret := _m.Called(ctx, tenantID, applicationIDs, pageSize, cursor)
   168  
   169  	var r0 []*model.BundlePage
   170  	if rf, ok := ret.Get(0).(func(context.Context, string, []string, int, string) []*model.BundlePage); ok {
   171  		r0 = rf(ctx, tenantID, applicationIDs, pageSize, cursor)
   172  	} else {
   173  		if ret.Get(0) != nil {
   174  			r0 = ret.Get(0).([]*model.BundlePage)
   175  		}
   176  	}
   177  
   178  	var r1 error
   179  	if rf, ok := ret.Get(1).(func(context.Context, string, []string, int, string) error); ok {
   180  		r1 = rf(ctx, tenantID, applicationIDs, pageSize, cursor)
   181  	} else {
   182  		r1 = ret.Error(1)
   183  	}
   184  
   185  	return r0, r1
   186  }
   187  
   188  // ListByResourceIDNoPaging provides a mock function with given fields: ctx, tenantID, appID, resourceType
   189  func (_m *BundleRepository) ListByResourceIDNoPaging(ctx context.Context, tenantID string, appID string, resourceType resource.Type) ([]*model.Bundle, error) {
   190  	ret := _m.Called(ctx, tenantID, appID, resourceType)
   191  
   192  	var r0 []*model.Bundle
   193  	if rf, ok := ret.Get(0).(func(context.Context, string, string, resource.Type) []*model.Bundle); ok {
   194  		r0 = rf(ctx, tenantID, appID, resourceType)
   195  	} else {
   196  		if ret.Get(0) != nil {
   197  			r0 = ret.Get(0).([]*model.Bundle)
   198  		}
   199  	}
   200  
   201  	var r1 error
   202  	if rf, ok := ret.Get(1).(func(context.Context, string, string, resource.Type) error); ok {
   203  		r1 = rf(ctx, tenantID, appID, resourceType)
   204  	} else {
   205  		r1 = ret.Error(1)
   206  	}
   207  
   208  	return r0, r1
   209  }
   210  
   211  // Update provides a mock function with given fields: ctx, tenant, item
   212  func (_m *BundleRepository) Update(ctx context.Context, tenant string, item *model.Bundle) error {
   213  	ret := _m.Called(ctx, tenant, item)
   214  
   215  	var r0 error
   216  	if rf, ok := ret.Get(0).(func(context.Context, string, *model.Bundle) error); ok {
   217  		r0 = rf(ctx, tenant, item)
   218  	} else {
   219  		r0 = ret.Error(0)
   220  	}
   221  
   222  	return r0
   223  }
   224  
   225  // UpdateGlobal provides a mock function with given fields: ctx, _a1
   226  func (_m *BundleRepository) UpdateGlobal(ctx context.Context, _a1 *model.Bundle) error {
   227  	ret := _m.Called(ctx, _a1)
   228  
   229  	var r0 error
   230  	if rf, ok := ret.Get(0).(func(context.Context, *model.Bundle) error); ok {
   231  		r0 = rf(ctx, _a1)
   232  	} else {
   233  		r0 = ret.Error(0)
   234  	}
   235  
   236  	return r0
   237  }
   238  
   239  type mockConstructorTestingTNewBundleRepository interface {
   240  	mock.TestingT
   241  	Cleanup(func())
   242  }
   243  
   244  // NewBundleRepository creates a new instance of BundleRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   245  func NewBundleRepository(t mockConstructorTestingTNewBundleRepository) *BundleRepository {
   246  	mock := &BundleRepository{}
   247  	mock.Mock.Test(t)
   248  
   249  	t.Cleanup(func() { mock.AssertExpectations(t) })
   250  
   251  	return mock
   252  }