github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/document/automock/document_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  // DocumentRepository is an autogenerated mock type for the DocumentRepository type
    14  type DocumentRepository struct {
    15  	mock.Mock
    16  }
    17  
    18  // Create provides a mock function with given fields: ctx, tenant, item
    19  func (_m *DocumentRepository) Create(ctx context.Context, tenant string, item *model.Document) error {
    20  	ret := _m.Called(ctx, tenant, item)
    21  
    22  	var r0 error
    23  	if rf, ok := ret.Get(0).(func(context.Context, string, *model.Document) error); ok {
    24  		r0 = rf(ctx, tenant, item)
    25  	} else {
    26  		r0 = ret.Error(0)
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // CreateGlobal provides a mock function with given fields: ctx, item
    33  func (_m *DocumentRepository) CreateGlobal(ctx context.Context, item *model.Document) error {
    34  	ret := _m.Called(ctx, item)
    35  
    36  	var r0 error
    37  	if rf, ok := ret.Get(0).(func(context.Context, *model.Document) error); ok {
    38  		r0 = rf(ctx, item)
    39  	} else {
    40  		r0 = ret.Error(0)
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // Delete provides a mock function with given fields: ctx, tenant, id
    47  func (_m *DocumentRepository) Delete(ctx context.Context, tenant string, id string) error {
    48  	ret := _m.Called(ctx, tenant, id)
    49  
    50  	var r0 error
    51  	if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
    52  		r0 = rf(ctx, tenant, id)
    53  	} else {
    54  		r0 = ret.Error(0)
    55  	}
    56  
    57  	return r0
    58  }
    59  
    60  // Exists provides a mock function with given fields: ctx, tenant, id
    61  func (_m *DocumentRepository) Exists(ctx context.Context, tenant string, id string) (bool, error) {
    62  	ret := _m.Called(ctx, tenant, id)
    63  
    64  	var r0 bool
    65  	if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
    66  		r0 = rf(ctx, tenant, id)
    67  	} else {
    68  		r0 = ret.Get(0).(bool)
    69  	}
    70  
    71  	var r1 error
    72  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    73  		r1 = rf(ctx, tenant, id)
    74  	} else {
    75  		r1 = ret.Error(1)
    76  	}
    77  
    78  	return r0, r1
    79  }
    80  
    81  // GetByID provides a mock function with given fields: ctx, tenant, id
    82  func (_m *DocumentRepository) GetByID(ctx context.Context, tenant string, id string) (*model.Document, error) {
    83  	ret := _m.Called(ctx, tenant, id)
    84  
    85  	var r0 *model.Document
    86  	if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.Document); ok {
    87  		r0 = rf(ctx, tenant, id)
    88  	} else {
    89  		if ret.Get(0) != nil {
    90  			r0 = ret.Get(0).(*model.Document)
    91  		}
    92  	}
    93  
    94  	var r1 error
    95  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    96  		r1 = rf(ctx, tenant, id)
    97  	} else {
    98  		r1 = ret.Error(1)
    99  	}
   100  
   101  	return r0, r1
   102  }
   103  
   104  // GetForBundle provides a mock function with given fields: ctx, tenant, id, bundleID
   105  func (_m *DocumentRepository) GetForBundle(ctx context.Context, tenant string, id string, bundleID string) (*model.Document, error) {
   106  	ret := _m.Called(ctx, tenant, id, bundleID)
   107  
   108  	var r0 *model.Document
   109  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.Document); ok {
   110  		r0 = rf(ctx, tenant, id, bundleID)
   111  	} else {
   112  		if ret.Get(0) != nil {
   113  			r0 = ret.Get(0).(*model.Document)
   114  		}
   115  	}
   116  
   117  	var r1 error
   118  	if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
   119  		r1 = rf(ctx, tenant, id, bundleID)
   120  	} else {
   121  		r1 = ret.Error(1)
   122  	}
   123  
   124  	return r0, r1
   125  }
   126  
   127  // ListByBundleIDs provides a mock function with given fields: ctx, tenantID, bundleIDs, pageSize, cursor
   128  func (_m *DocumentRepository) ListByBundleIDs(ctx context.Context, tenantID string, bundleIDs []string, pageSize int, cursor string) ([]*model.DocumentPage, error) {
   129  	ret := _m.Called(ctx, tenantID, bundleIDs, pageSize, cursor)
   130  
   131  	var r0 []*model.DocumentPage
   132  	if rf, ok := ret.Get(0).(func(context.Context, string, []string, int, string) []*model.DocumentPage); ok {
   133  		r0 = rf(ctx, tenantID, bundleIDs, pageSize, cursor)
   134  	} else {
   135  		if ret.Get(0) != nil {
   136  			r0 = ret.Get(0).([]*model.DocumentPage)
   137  		}
   138  	}
   139  
   140  	var r1 error
   141  	if rf, ok := ret.Get(1).(func(context.Context, string, []string, int, string) error); ok {
   142  		r1 = rf(ctx, tenantID, bundleIDs, pageSize, cursor)
   143  	} else {
   144  		r1 = ret.Error(1)
   145  	}
   146  
   147  	return r0, r1
   148  }
   149  
   150  type mockConstructorTestingTNewDocumentRepository interface {
   151  	mock.TestingT
   152  	Cleanup(func())
   153  }
   154  
   155  // NewDocumentRepository creates a new instance of DocumentRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   156  func NewDocumentRepository(t mockConstructorTestingTNewDocumentRepository) *DocumentRepository {
   157  	mock := &DocumentRepository{}
   158  	mock.Mock.Test(t)
   159  
   160  	t.Cleanup(func() { mock.AssertExpectations(t) })
   161  
   162  	return mock
   163  }