go.temporal.io/server@v1.23.0/common/quotas/reservation_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: reservation.go 27 28 // Package quotas is a generated GoMock package. 29 package quotas 30 31 import ( 32 reflect "reflect" 33 time "time" 34 35 gomock "github.com/golang/mock/gomock" 36 ) 37 38 // MockReservation is a mock of Reservation interface. 39 type MockReservation struct { 40 ctrl *gomock.Controller 41 recorder *MockReservationMockRecorder 42 } 43 44 // MockReservationMockRecorder is the mock recorder for MockReservation. 45 type MockReservationMockRecorder struct { 46 mock *MockReservation 47 } 48 49 // NewMockReservation creates a new mock instance. 50 func NewMockReservation(ctrl *gomock.Controller) *MockReservation { 51 mock := &MockReservation{ctrl: ctrl} 52 mock.recorder = &MockReservationMockRecorder{mock} 53 return mock 54 } 55 56 // EXPECT returns an object that allows the caller to indicate expected use. 57 func (m *MockReservation) EXPECT() *MockReservationMockRecorder { 58 return m.recorder 59 } 60 61 // Cancel mocks base method. 62 func (m *MockReservation) Cancel() { 63 m.ctrl.T.Helper() 64 m.ctrl.Call(m, "Cancel") 65 } 66 67 // Cancel indicates an expected call of Cancel. 68 func (mr *MockReservationMockRecorder) Cancel() *gomock.Call { 69 mr.mock.ctrl.T.Helper() 70 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockReservation)(nil).Cancel)) 71 } 72 73 // CancelAt mocks base method. 74 func (m *MockReservation) CancelAt(now time.Time) { 75 m.ctrl.T.Helper() 76 m.ctrl.Call(m, "CancelAt", now) 77 } 78 79 // CancelAt indicates an expected call of CancelAt. 80 func (mr *MockReservationMockRecorder) CancelAt(now interface{}) *gomock.Call { 81 mr.mock.ctrl.T.Helper() 82 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelAt", reflect.TypeOf((*MockReservation)(nil).CancelAt), now) 83 } 84 85 // Delay mocks base method. 86 func (m *MockReservation) Delay() time.Duration { 87 m.ctrl.T.Helper() 88 ret := m.ctrl.Call(m, "Delay") 89 ret0, _ := ret[0].(time.Duration) 90 return ret0 91 } 92 93 // Delay indicates an expected call of Delay. 94 func (mr *MockReservationMockRecorder) Delay() *gomock.Call { 95 mr.mock.ctrl.T.Helper() 96 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delay", reflect.TypeOf((*MockReservation)(nil).Delay)) 97 } 98 99 // DelayFrom mocks base method. 100 func (m *MockReservation) DelayFrom(now time.Time) time.Duration { 101 m.ctrl.T.Helper() 102 ret := m.ctrl.Call(m, "DelayFrom", now) 103 ret0, _ := ret[0].(time.Duration) 104 return ret0 105 } 106 107 // DelayFrom indicates an expected call of DelayFrom. 108 func (mr *MockReservationMockRecorder) DelayFrom(now interface{}) *gomock.Call { 109 mr.mock.ctrl.T.Helper() 110 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelayFrom", reflect.TypeOf((*MockReservation)(nil).DelayFrom), now) 111 } 112 113 // OK mocks base method. 114 func (m *MockReservation) OK() bool { 115 m.ctrl.T.Helper() 116 ret := m.ctrl.Call(m, "OK") 117 ret0, _ := ret[0].(bool) 118 return ret0 119 } 120 121 // OK indicates an expected call of OK. 122 func (mr *MockReservationMockRecorder) OK() *gomock.Call { 123 mr.mock.ctrl.T.Helper() 124 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OK", reflect.TypeOf((*MockReservation)(nil).OK)) 125 }