go.temporal.io/server@v1.23.0/common/tasks/sequential_task_queue_mock.go (about) 1 // The MIT License 2 // 3 // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. 4 // 5 // Copyright (c) 2020 Uber Technologies, Inc. 6 // 7 // Permission is hereby granted, free of charge, to any person obtaining a copy 8 // of this software and associated documentation files (the "Software"), to deal 9 // in the Software without restriction, including without limitation the rights 10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 // copies of the Software, and to permit persons to whom the Software is 12 // furnished to do so, subject to the following conditions: 13 // 14 // The above copyright notice and this permission notice shall be included in 15 // all copies or substantial portions of the Software. 16 // 17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 // THE SOFTWARE. 24 25 // Code generated by MockGen. DO NOT EDIT. 26 // Source: sequential_task_queue.go 27 28 // Package tasks is a generated GoMock package. 29 package tasks 30 31 import ( 32 reflect "reflect" 33 34 gomock "github.com/golang/mock/gomock" 35 ) 36 37 // MockSequentialTaskQueue is a mock of SequentialTaskQueue interface. 38 type MockSequentialTaskQueue[T Task] struct { 39 ctrl *gomock.Controller 40 recorder *MockSequentialTaskQueueMockRecorder[T] 41 } 42 43 // MockSequentialTaskQueueMockRecorder is the mock recorder for MockSequentialTaskQueue. 44 type MockSequentialTaskQueueMockRecorder[T Task] struct { 45 mock *MockSequentialTaskQueue[T] 46 } 47 48 // NewMockSequentialTaskQueue creates a new mock instance. 49 func NewMockSequentialTaskQueue[T Task](ctrl *gomock.Controller) *MockSequentialTaskQueue[T] { 50 mock := &MockSequentialTaskQueue[T]{ctrl: ctrl} 51 mock.recorder = &MockSequentialTaskQueueMockRecorder[T]{mock} 52 return mock 53 } 54 55 // EXPECT returns an object that allows the caller to indicate expected use. 56 func (m *MockSequentialTaskQueue[T]) EXPECT() *MockSequentialTaskQueueMockRecorder[T] { 57 return m.recorder 58 } 59 60 // Add mocks base method. 61 func (m *MockSequentialTaskQueue[T]) Add(arg0 T) { 62 m.ctrl.T.Helper() 63 m.ctrl.Call(m, "Add", arg0) 64 } 65 66 // Add indicates an expected call of Add. 67 func (mr *MockSequentialTaskQueueMockRecorder[T]) Add(arg0 interface{}) *gomock.Call { 68 mr.mock.ctrl.T.Helper() 69 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockSequentialTaskQueue[T])(nil).Add), arg0) 70 } 71 72 // ID mocks base method. 73 func (m *MockSequentialTaskQueue[T]) ID() interface{} { 74 m.ctrl.T.Helper() 75 ret := m.ctrl.Call(m, "ID") 76 ret0, _ := ret[0].(interface{}) 77 return ret0 78 } 79 80 // ID indicates an expected call of ID. 81 func (mr *MockSequentialTaskQueueMockRecorder[T]) ID() *gomock.Call { 82 mr.mock.ctrl.T.Helper() 83 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockSequentialTaskQueue[T])(nil).ID)) 84 } 85 86 // IsEmpty mocks base method. 87 func (m *MockSequentialTaskQueue[T]) IsEmpty() bool { 88 m.ctrl.T.Helper() 89 ret := m.ctrl.Call(m, "IsEmpty") 90 ret0, _ := ret[0].(bool) 91 return ret0 92 } 93 94 // IsEmpty indicates an expected call of IsEmpty. 95 func (mr *MockSequentialTaskQueueMockRecorder[T]) IsEmpty() *gomock.Call { 96 mr.mock.ctrl.T.Helper() 97 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsEmpty", reflect.TypeOf((*MockSequentialTaskQueue[T])(nil).IsEmpty)) 98 } 99 100 // Len mocks base method. 101 func (m *MockSequentialTaskQueue[T]) Len() int { 102 m.ctrl.T.Helper() 103 ret := m.ctrl.Call(m, "Len") 104 ret0, _ := ret[0].(int) 105 return ret0 106 } 107 108 // Len indicates an expected call of Len. 109 func (mr *MockSequentialTaskQueueMockRecorder[T]) Len() *gomock.Call { 110 mr.mock.ctrl.T.Helper() 111 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Len", reflect.TypeOf((*MockSequentialTaskQueue[T])(nil).Len)) 112 } 113 114 // Remove mocks base method. 115 func (m *MockSequentialTaskQueue[T]) Remove() T { 116 m.ctrl.T.Helper() 117 ret := m.ctrl.Call(m, "Remove") 118 ret0, _ := ret[0].(T) 119 return ret0 120 } 121 122 // Remove indicates an expected call of Remove. 123 func (mr *MockSequentialTaskQueueMockRecorder[T]) Remove() *gomock.Call { 124 mr.mock.ctrl.T.Helper() 125 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockSequentialTaskQueue[T])(nil).Remove)) 126 }