github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/scenarioassignment/automock/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  
    12  // Repository is an autogenerated mock type for the Repository type
    13  type Repository struct {
    14  	mock.Mock
    15  }
    16  
    17  // GetForScenarioName provides a mock function with given fields: ctx, tenantID, scenarioName
    18  func (_m *Repository) GetForScenarioName(ctx context.Context, tenantID string, scenarioName string) (model.AutomaticScenarioAssignment, error) {
    19  	ret := _m.Called(ctx, tenantID, scenarioName)
    20  
    21  	var r0 model.AutomaticScenarioAssignment
    22  	if rf, ok := ret.Get(0).(func(context.Context, string, string) model.AutomaticScenarioAssignment); ok {
    23  		r0 = rf(ctx, tenantID, scenarioName)
    24  	} else {
    25  		r0 = ret.Get(0).(model.AutomaticScenarioAssignment)
    26  	}
    27  
    28  	var r1 error
    29  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    30  		r1 = rf(ctx, tenantID, scenarioName)
    31  	} else {
    32  		r1 = ret.Error(1)
    33  	}
    34  
    35  	return r0, r1
    36  }
    37  
    38  // List provides a mock function with given fields: ctx, tenant, pageSize, cursor
    39  func (_m *Repository) List(ctx context.Context, tenant string, pageSize int, cursor string) (*model.AutomaticScenarioAssignmentPage, error) {
    40  	ret := _m.Called(ctx, tenant, pageSize, cursor)
    41  
    42  	var r0 *model.AutomaticScenarioAssignmentPage
    43  	if rf, ok := ret.Get(0).(func(context.Context, string, int, string) *model.AutomaticScenarioAssignmentPage); ok {
    44  		r0 = rf(ctx, tenant, pageSize, cursor)
    45  	} else {
    46  		if ret.Get(0) != nil {
    47  			r0 = ret.Get(0).(*model.AutomaticScenarioAssignmentPage)
    48  		}
    49  	}
    50  
    51  	var r1 error
    52  	if rf, ok := ret.Get(1).(func(context.Context, string, int, string) error); ok {
    53  		r1 = rf(ctx, tenant, pageSize, cursor)
    54  	} else {
    55  		r1 = ret.Error(1)
    56  	}
    57  
    58  	return r0, r1
    59  }
    60  
    61  // ListForTargetTenant provides a mock function with given fields: ctx, tenantID, targetTenantID
    62  func (_m *Repository) ListForTargetTenant(ctx context.Context, tenantID string, targetTenantID string) ([]*model.AutomaticScenarioAssignment, error) {
    63  	ret := _m.Called(ctx, tenantID, targetTenantID)
    64  
    65  	var r0 []*model.AutomaticScenarioAssignment
    66  	if rf, ok := ret.Get(0).(func(context.Context, string, string) []*model.AutomaticScenarioAssignment); ok {
    67  		r0 = rf(ctx, tenantID, targetTenantID)
    68  	} else {
    69  		if ret.Get(0) != nil {
    70  			r0 = ret.Get(0).([]*model.AutomaticScenarioAssignment)
    71  		}
    72  	}
    73  
    74  	var r1 error
    75  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    76  		r1 = rf(ctx, tenantID, targetTenantID)
    77  	} else {
    78  		r1 = ret.Error(1)
    79  	}
    80  
    81  	return r0, r1
    82  }
    83  
    84  type mockConstructorTestingTNewRepository interface {
    85  	mock.TestingT
    86  	Cleanup(func())
    87  }
    88  
    89  // NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    90  func NewRepository(t mockConstructorTestingTNewRepository) *Repository {
    91  	mock := &Repository{}
    92  	mock.Mock.Test(t)
    93  
    94  	t.Cleanup(func() { mock.AssertExpectations(t) })
    95  
    96  	return mock
    97  }