github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/pkg/coveragedb/mocks/RowIterator.go (about)

     1  // Code generated by mockery; DO NOT EDIT.
     2  // github.com/vektra/mockery
     3  // template: testify
     4  
     5  package mocks
     6  
     7  import (
     8  	"github.com/google/syzkaller/pkg/coveragedb/spannerclient"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // NewRowIterator creates a new instance of RowIterator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    13  // The first argument is typically a *testing.T value.
    14  func NewRowIterator(t interface {
    15  	mock.TestingT
    16  	Cleanup(func())
    17  }) *RowIterator {
    18  	mock := &RowIterator{}
    19  	mock.Mock.Test(t)
    20  
    21  	t.Cleanup(func() { mock.AssertExpectations(t) })
    22  
    23  	return mock
    24  }
    25  
    26  // RowIterator is an autogenerated mock type for the RowIterator type
    27  type RowIterator struct {
    28  	mock.Mock
    29  }
    30  
    31  type RowIterator_Expecter struct {
    32  	mock *mock.Mock
    33  }
    34  
    35  func (_m *RowIterator) EXPECT() *RowIterator_Expecter {
    36  	return &RowIterator_Expecter{mock: &_m.Mock}
    37  }
    38  
    39  // Next provides a mock function for the type RowIterator
    40  func (_mock *RowIterator) Next() (spannerclient.Row, error) {
    41  	ret := _mock.Called()
    42  
    43  	if len(ret) == 0 {
    44  		panic("no return value specified for Next")
    45  	}
    46  
    47  	var r0 spannerclient.Row
    48  	var r1 error
    49  	if returnFunc, ok := ret.Get(0).(func() (spannerclient.Row, error)); ok {
    50  		return returnFunc()
    51  	}
    52  	if returnFunc, ok := ret.Get(0).(func() spannerclient.Row); ok {
    53  		r0 = returnFunc()
    54  	} else {
    55  		if ret.Get(0) != nil {
    56  			r0 = ret.Get(0).(spannerclient.Row)
    57  		}
    58  	}
    59  	if returnFunc, ok := ret.Get(1).(func() error); ok {
    60  		r1 = returnFunc()
    61  	} else {
    62  		r1 = ret.Error(1)
    63  	}
    64  	return r0, r1
    65  }
    66  
    67  // RowIterator_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'
    68  type RowIterator_Next_Call struct {
    69  	*mock.Call
    70  }
    71  
    72  // Next is a helper method to define mock.On call
    73  func (_e *RowIterator_Expecter) Next() *RowIterator_Next_Call {
    74  	return &RowIterator_Next_Call{Call: _e.mock.On("Next")}
    75  }
    76  
    77  func (_c *RowIterator_Next_Call) Run(run func()) *RowIterator_Next_Call {
    78  	_c.Call.Run(func(args mock.Arguments) {
    79  		run()
    80  	})
    81  	return _c
    82  }
    83  
    84  func (_c *RowIterator_Next_Call) Return(row spannerclient.Row, err error) *RowIterator_Next_Call {
    85  	_c.Call.Return(row, err)
    86  	return _c
    87  }
    88  
    89  func (_c *RowIterator_Next_Call) RunAndReturn(run func() (spannerclient.Row, error)) *RowIterator_Next_Call {
    90  	_c.Call.Return(run)
    91  	return _c
    92  }
    93  
    94  // Stop provides a mock function for the type RowIterator
    95  func (_mock *RowIterator) Stop() {
    96  	_mock.Called()
    97  	return
    98  }
    99  
   100  // RowIterator_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
   101  type RowIterator_Stop_Call struct {
   102  	*mock.Call
   103  }
   104  
   105  // Stop is a helper method to define mock.On call
   106  func (_e *RowIterator_Expecter) Stop() *RowIterator_Stop_Call {
   107  	return &RowIterator_Stop_Call{Call: _e.mock.On("Stop")}
   108  }
   109  
   110  func (_c *RowIterator_Stop_Call) Run(run func()) *RowIterator_Stop_Call {
   111  	_c.Call.Run(func(args mock.Arguments) {
   112  		run()
   113  	})
   114  	return _c
   115  }
   116  
   117  func (_c *RowIterator_Stop_Call) Return() *RowIterator_Stop_Call {
   118  	_c.Call.Return()
   119  	return _c
   120  }
   121  
   122  func (_c *RowIterator_Stop_Call) RunAndReturn(run func()) *RowIterator_Stop_Call {
   123  	_c.Run(run)
   124  	return _c
   125  }