go.temporal.io/server@v1.23.0/common/tasks/task_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: task.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  	backoff "go.temporal.io/server/common/backoff"
    36  )
    37  
    38  // MockTask is a mock of Task interface.
    39  type MockTask struct {
    40  	ctrl     *gomock.Controller
    41  	recorder *MockTaskMockRecorder
    42  }
    43  
    44  // MockTaskMockRecorder is the mock recorder for MockTask.
    45  type MockTaskMockRecorder struct {
    46  	mock *MockTask
    47  }
    48  
    49  // NewMockTask creates a new mock instance.
    50  func NewMockTask(ctrl *gomock.Controller) *MockTask {
    51  	mock := &MockTask{ctrl: ctrl}
    52  	mock.recorder = &MockTaskMockRecorder{mock}
    53  	return mock
    54  }
    55  
    56  // EXPECT returns an object that allows the caller to indicate expected use.
    57  func (m *MockTask) EXPECT() *MockTaskMockRecorder {
    58  	return m.recorder
    59  }
    60  
    61  // Abort mocks base method.
    62  func (m *MockTask) Abort() {
    63  	m.ctrl.T.Helper()
    64  	m.ctrl.Call(m, "Abort")
    65  }
    66  
    67  // Abort indicates an expected call of Abort.
    68  func (mr *MockTaskMockRecorder) Abort() *gomock.Call {
    69  	mr.mock.ctrl.T.Helper()
    70  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Abort", reflect.TypeOf((*MockTask)(nil).Abort))
    71  }
    72  
    73  // Ack mocks base method.
    74  func (m *MockTask) Ack() {
    75  	m.ctrl.T.Helper()
    76  	m.ctrl.Call(m, "Ack")
    77  }
    78  
    79  // Ack indicates an expected call of Ack.
    80  func (mr *MockTaskMockRecorder) Ack() *gomock.Call {
    81  	mr.mock.ctrl.T.Helper()
    82  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ack", reflect.TypeOf((*MockTask)(nil).Ack))
    83  }
    84  
    85  // Cancel mocks base method.
    86  func (m *MockTask) Cancel() {
    87  	m.ctrl.T.Helper()
    88  	m.ctrl.Call(m, "Cancel")
    89  }
    90  
    91  // Cancel indicates an expected call of Cancel.
    92  func (mr *MockTaskMockRecorder) Cancel() *gomock.Call {
    93  	mr.mock.ctrl.T.Helper()
    94  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockTask)(nil).Cancel))
    95  }
    96  
    97  // Execute mocks base method.
    98  func (m *MockTask) Execute() error {
    99  	m.ctrl.T.Helper()
   100  	ret := m.ctrl.Call(m, "Execute")
   101  	ret0, _ := ret[0].(error)
   102  	return ret0
   103  }
   104  
   105  // Execute indicates an expected call of Execute.
   106  func (mr *MockTaskMockRecorder) Execute() *gomock.Call {
   107  	mr.mock.ctrl.T.Helper()
   108  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockTask)(nil).Execute))
   109  }
   110  
   111  // HandleErr mocks base method.
   112  func (m *MockTask) HandleErr(err error) error {
   113  	m.ctrl.T.Helper()
   114  	ret := m.ctrl.Call(m, "HandleErr", err)
   115  	ret0, _ := ret[0].(error)
   116  	return ret0
   117  }
   118  
   119  // HandleErr indicates an expected call of HandleErr.
   120  func (mr *MockTaskMockRecorder) HandleErr(err interface{}) *gomock.Call {
   121  	mr.mock.ctrl.T.Helper()
   122  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleErr", reflect.TypeOf((*MockTask)(nil).HandleErr), err)
   123  }
   124  
   125  // IsRetryableError mocks base method.
   126  func (m *MockTask) IsRetryableError(err error) bool {
   127  	m.ctrl.T.Helper()
   128  	ret := m.ctrl.Call(m, "IsRetryableError", err)
   129  	ret0, _ := ret[0].(bool)
   130  	return ret0
   131  }
   132  
   133  // IsRetryableError indicates an expected call of IsRetryableError.
   134  func (mr *MockTaskMockRecorder) IsRetryableError(err interface{}) *gomock.Call {
   135  	mr.mock.ctrl.T.Helper()
   136  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRetryableError", reflect.TypeOf((*MockTask)(nil).IsRetryableError), err)
   137  }
   138  
   139  // Nack mocks base method.
   140  func (m *MockTask) Nack(err error) {
   141  	m.ctrl.T.Helper()
   142  	m.ctrl.Call(m, "Nack", err)
   143  }
   144  
   145  // Nack indicates an expected call of Nack.
   146  func (mr *MockTaskMockRecorder) Nack(err interface{}) *gomock.Call {
   147  	mr.mock.ctrl.T.Helper()
   148  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nack", reflect.TypeOf((*MockTask)(nil).Nack), err)
   149  }
   150  
   151  // Reschedule mocks base method.
   152  func (m *MockTask) Reschedule() {
   153  	m.ctrl.T.Helper()
   154  	m.ctrl.Call(m, "Reschedule")
   155  }
   156  
   157  // Reschedule indicates an expected call of Reschedule.
   158  func (mr *MockTaskMockRecorder) Reschedule() *gomock.Call {
   159  	mr.mock.ctrl.T.Helper()
   160  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reschedule", reflect.TypeOf((*MockTask)(nil).Reschedule))
   161  }
   162  
   163  // RetryPolicy mocks base method.
   164  func (m *MockTask) RetryPolicy() backoff.RetryPolicy {
   165  	m.ctrl.T.Helper()
   166  	ret := m.ctrl.Call(m, "RetryPolicy")
   167  	ret0, _ := ret[0].(backoff.RetryPolicy)
   168  	return ret0
   169  }
   170  
   171  // RetryPolicy indicates an expected call of RetryPolicy.
   172  func (mr *MockTaskMockRecorder) RetryPolicy() *gomock.Call {
   173  	mr.mock.ctrl.T.Helper()
   174  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetryPolicy", reflect.TypeOf((*MockTask)(nil).RetryPolicy))
   175  }
   176  
   177  // State mocks base method.
   178  func (m *MockTask) State() State {
   179  	m.ctrl.T.Helper()
   180  	ret := m.ctrl.Call(m, "State")
   181  	ret0, _ := ret[0].(State)
   182  	return ret0
   183  }
   184  
   185  // State indicates an expected call of State.
   186  func (mr *MockTaskMockRecorder) State() *gomock.Call {
   187  	mr.mock.ctrl.T.Helper()
   188  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockTask)(nil).State))
   189  }