go.temporal.io/server@v1.23.0/common/persistence/history_branch_util_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: history_branch_util.go
    27  
    28  // Package persistence is a generated GoMock package.
    29  package persistence
    30  
    31  import (
    32  	reflect "reflect"
    33  	time "time"
    34  
    35  	gomock "github.com/golang/mock/gomock"
    36  	persistence "go.temporal.io/server/api/persistence/v1"
    37  )
    38  
    39  // MockHistoryBranchUtil is a mock of HistoryBranchUtil interface.
    40  type MockHistoryBranchUtil struct {
    41  	ctrl     *gomock.Controller
    42  	recorder *MockHistoryBranchUtilMockRecorder
    43  }
    44  
    45  // MockHistoryBranchUtilMockRecorder is the mock recorder for MockHistoryBranchUtil.
    46  type MockHistoryBranchUtilMockRecorder struct {
    47  	mock *MockHistoryBranchUtil
    48  }
    49  
    50  // NewMockHistoryBranchUtil creates a new mock instance.
    51  func NewMockHistoryBranchUtil(ctrl *gomock.Controller) *MockHistoryBranchUtil {
    52  	mock := &MockHistoryBranchUtil{ctrl: ctrl}
    53  	mock.recorder = &MockHistoryBranchUtilMockRecorder{mock}
    54  	return mock
    55  }
    56  
    57  // EXPECT returns an object that allows the caller to indicate expected use.
    58  func (m *MockHistoryBranchUtil) EXPECT() *MockHistoryBranchUtilMockRecorder {
    59  	return m.recorder
    60  }
    61  
    62  // NewHistoryBranch mocks base method.
    63  func (m *MockHistoryBranchUtil) NewHistoryBranch(namespaceID, workflowID, runID, treeID string, branchID *string, ancestors []*persistence.HistoryBranchRange, runTimeout, executionTimeout, retentionDuration time.Duration) ([]byte, error) {
    64  	m.ctrl.T.Helper()
    65  	ret := m.ctrl.Call(m, "NewHistoryBranch", namespaceID, workflowID, runID, treeID, branchID, ancestors, runTimeout, executionTimeout, retentionDuration)
    66  	ret0, _ := ret[0].([]byte)
    67  	ret1, _ := ret[1].(error)
    68  	return ret0, ret1
    69  }
    70  
    71  // NewHistoryBranch indicates an expected call of NewHistoryBranch.
    72  func (mr *MockHistoryBranchUtilMockRecorder) NewHistoryBranch(namespaceID, workflowID, runID, treeID, branchID, ancestors, runTimeout, executionTimeout, retentionDuration interface{}) *gomock.Call {
    73  	mr.mock.ctrl.T.Helper()
    74  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHistoryBranch", reflect.TypeOf((*MockHistoryBranchUtil)(nil).NewHistoryBranch), namespaceID, workflowID, runID, treeID, branchID, ancestors, runTimeout, executionTimeout, retentionDuration)
    75  }
    76  
    77  // ParseHistoryBranchInfo mocks base method.
    78  func (m *MockHistoryBranchUtil) ParseHistoryBranchInfo(branchToken []byte) (*persistence.HistoryBranch, error) {
    79  	m.ctrl.T.Helper()
    80  	ret := m.ctrl.Call(m, "ParseHistoryBranchInfo", branchToken)
    81  	ret0, _ := ret[0].(*persistence.HistoryBranch)
    82  	ret1, _ := ret[1].(error)
    83  	return ret0, ret1
    84  }
    85  
    86  // ParseHistoryBranchInfo indicates an expected call of ParseHistoryBranchInfo.
    87  func (mr *MockHistoryBranchUtilMockRecorder) ParseHistoryBranchInfo(branchToken interface{}) *gomock.Call {
    88  	mr.mock.ctrl.T.Helper()
    89  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseHistoryBranchInfo", reflect.TypeOf((*MockHistoryBranchUtil)(nil).ParseHistoryBranchInfo), branchToken)
    90  }
    91  
    92  // UpdateHistoryBranchInfo mocks base method.
    93  func (m *MockHistoryBranchUtil) UpdateHistoryBranchInfo(branchToken []byte, branchInfo *persistence.HistoryBranch) ([]byte, error) {
    94  	m.ctrl.T.Helper()
    95  	ret := m.ctrl.Call(m, "UpdateHistoryBranchInfo", branchToken, branchInfo)
    96  	ret0, _ := ret[0].([]byte)
    97  	ret1, _ := ret[1].(error)
    98  	return ret0, ret1
    99  }
   100  
   101  // UpdateHistoryBranchInfo indicates an expected call of UpdateHistoryBranchInfo.
   102  func (mr *MockHistoryBranchUtilMockRecorder) UpdateHistoryBranchInfo(branchToken, branchInfo interface{}) *gomock.Call {
   103  	mr.mock.ctrl.T.Helper()
   104  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateHistoryBranchInfo", reflect.TypeOf((*MockHistoryBranchUtil)(nil).UpdateHistoryBranchInfo), branchToken, branchInfo)
   105  }