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