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