github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/destinationfetchersvc/automock/destination_repo.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 // DestinationRepo is an autogenerated mock type for the DestinationRepo type 14 type DestinationRepo struct { 15 mock.Mock 16 } 17 18 // DeleteOld provides a mock function with given fields: ctx, latestRevision, tenantID 19 func (_m *DestinationRepo) DeleteOld(ctx context.Context, latestRevision string, tenantID string) error { 20 ret := _m.Called(ctx, latestRevision, tenantID) 21 22 var r0 error 23 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 24 r0 = rf(ctx, latestRevision, tenantID) 25 } else { 26 r0 = ret.Error(0) 27 } 28 29 return r0 30 } 31 32 // Upsert provides a mock function with given fields: ctx, in, id, tenantID, bundleID, revision 33 func (_m *DestinationRepo) Upsert(ctx context.Context, in model.DestinationInput, id string, tenantID string, bundleID string, revision string) error { 34 ret := _m.Called(ctx, in, id, tenantID, bundleID, revision) 35 36 var r0 error 37 if rf, ok := ret.Get(0).(func(context.Context, model.DestinationInput, string, string, string, string) error); ok { 38 r0 = rf(ctx, in, id, tenantID, bundleID, revision) 39 } else { 40 r0 = ret.Error(0) 41 } 42 43 return r0 44 } 45 46 type mockConstructorTestingTNewDestinationRepo interface { 47 mock.TestingT 48 Cleanup(func()) 49 } 50 51 // NewDestinationRepo creates a new instance of DestinationRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 52 func NewDestinationRepo(t mockConstructorTestingTNewDestinationRepo) *DestinationRepo { 53 mock := &DestinationRepo{} 54 mock.Mock.Test(t) 55 56 t.Cleanup(func() { mock.AssertExpectations(t) }) 57 58 return mock 59 }