github.com/juju/juju@v0.0.0-20240327075706-a90865de2538/worker/lease/manifold/database_mock_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/juju/juju/core/database (interfaces: TrackedDB) 3 // 4 // Generated by this command: 5 // 6 // mockgen -package manifold_test -destination database_mock_test.go github.com/juju/juju/core/database TrackedDB 7 // 8 9 // Package manifold_test is a generated GoMock package. 10 package manifold_test 11 12 import ( 13 context "context" 14 sql "database/sql" 15 reflect "reflect" 16 17 gomock "go.uber.org/mock/gomock" 18 ) 19 20 // MockTrackedDB is a mock of TrackedDB interface. 21 type MockTrackedDB struct { 22 ctrl *gomock.Controller 23 recorder *MockTrackedDBMockRecorder 24 } 25 26 // MockTrackedDBMockRecorder is the mock recorder for MockTrackedDB. 27 type MockTrackedDBMockRecorder struct { 28 mock *MockTrackedDB 29 } 30 31 // NewMockTrackedDB creates a new mock instance. 32 func NewMockTrackedDB(ctrl *gomock.Controller) *MockTrackedDB { 33 mock := &MockTrackedDB{ctrl: ctrl} 34 mock.recorder = &MockTrackedDBMockRecorder{mock} 35 return mock 36 } 37 38 // EXPECT returns an object that allows the caller to indicate expected use. 39 func (m *MockTrackedDB) EXPECT() *MockTrackedDBMockRecorder { 40 return m.recorder 41 } 42 43 // Err mocks base method. 44 func (m *MockTrackedDB) Err() error { 45 m.ctrl.T.Helper() 46 ret := m.ctrl.Call(m, "Err") 47 ret0, _ := ret[0].(error) 48 return ret0 49 } 50 51 // Err indicates an expected call of Err. 52 func (mr *MockTrackedDBMockRecorder) Err() *gomock.Call { 53 mr.mock.ctrl.T.Helper() 54 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockTrackedDB)(nil).Err)) 55 } 56 57 // Txn mocks base method. 58 func (m *MockTrackedDB) Txn(arg0 context.Context, arg1 func(context.Context, *sql.Tx) error) error { 59 m.ctrl.T.Helper() 60 ret := m.ctrl.Call(m, "Txn", arg0, arg1) 61 ret0, _ := ret[0].(error) 62 return ret0 63 } 64 65 // Txn indicates an expected call of Txn. 66 func (mr *MockTrackedDBMockRecorder) Txn(arg0, arg1 any) *gomock.Call { 67 mr.mock.ctrl.T.Helper() 68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTrackedDB)(nil).Txn), arg0, arg1) 69 } 70 71 // TxnNoRetry mocks base method. 72 func (m *MockTrackedDB) TxnNoRetry(arg0 context.Context, arg1 func(context.Context, *sql.Tx) error) error { 73 m.ctrl.T.Helper() 74 ret := m.ctrl.Call(m, "TxnNoRetry", arg0, arg1) 75 ret0, _ := ret[0].(error) 76 return ret0 77 } 78 79 // TxnNoRetry indicates an expected call of TxnNoRetry. 80 func (mr *MockTrackedDBMockRecorder) TxnNoRetry(arg0, arg1 any) *gomock.Call { 81 mr.mock.ctrl.T.Helper() 82 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TxnNoRetry", reflect.TypeOf((*MockTrackedDB)(nil).TxnNoRetry), arg0, arg1) 83 }