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