mock_operation_server_test.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: /Users/mariano/go/pkg/mod/google.golang.org/genproto@v0.0.0-20200904004341-0bd0a958aa1d/googleapis/longrunning/operations.pb.go
  3. // Package cloudcas is a generated GoMock package.
  4. package cloudcas
  5. import (
  6. context "context"
  7. gomock "github.com/golang/mock/gomock"
  8. longrunning "google.golang.org/genproto/googleapis/longrunning"
  9. grpc "google.golang.org/grpc"
  10. emptypb "google.golang.org/protobuf/types/known/emptypb"
  11. reflect "reflect"
  12. )
  13. // MockisOperation_Result is a mock of isOperation_Result interface
  14. type MockisOperation_Result struct {
  15. ctrl *gomock.Controller
  16. recorder *MockisOperation_ResultMockRecorder
  17. }
  18. // MockisOperation_ResultMockRecorder is the mock recorder for MockisOperation_Result
  19. type MockisOperation_ResultMockRecorder struct {
  20. mock *MockisOperation_Result
  21. }
  22. // NewMockisOperation_Result creates a new mock instance
  23. func NewMockisOperation_Result(ctrl *gomock.Controller) *MockisOperation_Result {
  24. mock := &MockisOperation_Result{ctrl: ctrl}
  25. mock.recorder = &MockisOperation_ResultMockRecorder{mock}
  26. return mock
  27. }
  28. // EXPECT returns an object that allows the caller to indicate expected use
  29. func (m *MockisOperation_Result) EXPECT() *MockisOperation_ResultMockRecorder {
  30. return m.recorder
  31. }
  32. // isOperation_Result mocks base method
  33. func (m *MockisOperation_Result) isOperation_Result() {
  34. m.ctrl.T.Helper()
  35. m.ctrl.Call(m, "isOperation_Result")
  36. }
  37. // isOperation_Result indicates an expected call of isOperation_Result
  38. func (mr *MockisOperation_ResultMockRecorder) isOperation_Result() *gomock.Call {
  39. mr.mock.ctrl.T.Helper()
  40. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "isOperation_Result", reflect.TypeOf((*MockisOperation_Result)(nil).isOperation_Result))
  41. }
  42. // MockOperationsClient is a mock of OperationsClient interface
  43. type MockOperationsClient struct {
  44. ctrl *gomock.Controller
  45. recorder *MockOperationsClientMockRecorder
  46. }
  47. // MockOperationsClientMockRecorder is the mock recorder for MockOperationsClient
  48. type MockOperationsClientMockRecorder struct {
  49. mock *MockOperationsClient
  50. }
  51. // NewMockOperationsClient creates a new mock instance
  52. func NewMockOperationsClient(ctrl *gomock.Controller) *MockOperationsClient {
  53. mock := &MockOperationsClient{ctrl: ctrl}
  54. mock.recorder = &MockOperationsClientMockRecorder{mock}
  55. return mock
  56. }
  57. // EXPECT returns an object that allows the caller to indicate expected use
  58. func (m *MockOperationsClient) EXPECT() *MockOperationsClientMockRecorder {
  59. return m.recorder
  60. }
  61. // ListOperations mocks base method
  62. func (m *MockOperationsClient) ListOperations(ctx context.Context, in *longrunning.ListOperationsRequest, opts ...grpc.CallOption) (*longrunning.ListOperationsResponse, error) {
  63. m.ctrl.T.Helper()
  64. varargs := []interface{}{ctx, in}
  65. for _, a := range opts {
  66. varargs = append(varargs, a)
  67. }
  68. ret := m.ctrl.Call(m, "ListOperations", varargs...)
  69. ret0, _ := ret[0].(*longrunning.ListOperationsResponse)
  70. ret1, _ := ret[1].(error)
  71. return ret0, ret1
  72. }
  73. // ListOperations indicates an expected call of ListOperations
  74. func (mr *MockOperationsClientMockRecorder) ListOperations(ctx, in interface{}, opts ...interface{}) *gomock.Call {
  75. mr.mock.ctrl.T.Helper()
  76. varargs := append([]interface{}{ctx, in}, opts...)
  77. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockOperationsClient)(nil).ListOperations), varargs...)
  78. }
  79. // GetOperation mocks base method
  80. func (m *MockOperationsClient) GetOperation(ctx context.Context, in *longrunning.GetOperationRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
  81. m.ctrl.T.Helper()
  82. varargs := []interface{}{ctx, in}
  83. for _, a := range opts {
  84. varargs = append(varargs, a)
  85. }
  86. ret := m.ctrl.Call(m, "GetOperation", varargs...)
  87. ret0, _ := ret[0].(*longrunning.Operation)
  88. ret1, _ := ret[1].(error)
  89. return ret0, ret1
  90. }
  91. // GetOperation indicates an expected call of GetOperation
  92. func (mr *MockOperationsClientMockRecorder) GetOperation(ctx, in interface{}, opts ...interface{}) *gomock.Call {
  93. mr.mock.ctrl.T.Helper()
  94. varargs := append([]interface{}{ctx, in}, opts...)
  95. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockOperationsClient)(nil).GetOperation), varargs...)
  96. }
  97. // DeleteOperation mocks base method
  98. func (m *MockOperationsClient) DeleteOperation(ctx context.Context, in *longrunning.DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  99. m.ctrl.T.Helper()
  100. varargs := []interface{}{ctx, in}
  101. for _, a := range opts {
  102. varargs = append(varargs, a)
  103. }
  104. ret := m.ctrl.Call(m, "DeleteOperation", varargs...)
  105. ret0, _ := ret[0].(*emptypb.Empty)
  106. ret1, _ := ret[1].(error)
  107. return ret0, ret1
  108. }
  109. // DeleteOperation indicates an expected call of DeleteOperation
  110. func (mr *MockOperationsClientMockRecorder) DeleteOperation(ctx, in interface{}, opts ...interface{}) *gomock.Call {
  111. mr.mock.ctrl.T.Helper()
  112. varargs := append([]interface{}{ctx, in}, opts...)
  113. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOperation", reflect.TypeOf((*MockOperationsClient)(nil).DeleteOperation), varargs...)
  114. }
  115. // CancelOperation mocks base method
  116. func (m *MockOperationsClient) CancelOperation(ctx context.Context, in *longrunning.CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  117. m.ctrl.T.Helper()
  118. varargs := []interface{}{ctx, in}
  119. for _, a := range opts {
  120. varargs = append(varargs, a)
  121. }
  122. ret := m.ctrl.Call(m, "CancelOperation", varargs...)
  123. ret0, _ := ret[0].(*emptypb.Empty)
  124. ret1, _ := ret[1].(error)
  125. return ret0, ret1
  126. }
  127. // CancelOperation indicates an expected call of CancelOperation
  128. func (mr *MockOperationsClientMockRecorder) CancelOperation(ctx, in interface{}, opts ...interface{}) *gomock.Call {
  129. mr.mock.ctrl.T.Helper()
  130. varargs := append([]interface{}{ctx, in}, opts...)
  131. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelOperation", reflect.TypeOf((*MockOperationsClient)(nil).CancelOperation), varargs...)
  132. }
  133. // WaitOperation mocks base method
  134. func (m *MockOperationsClient) WaitOperation(ctx context.Context, in *longrunning.WaitOperationRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
  135. m.ctrl.T.Helper()
  136. varargs := []interface{}{ctx, in}
  137. for _, a := range opts {
  138. varargs = append(varargs, a)
  139. }
  140. ret := m.ctrl.Call(m, "WaitOperation", varargs...)
  141. ret0, _ := ret[0].(*longrunning.Operation)
  142. ret1, _ := ret[1].(error)
  143. return ret0, ret1
  144. }
  145. // WaitOperation indicates an expected call of WaitOperation
  146. func (mr *MockOperationsClientMockRecorder) WaitOperation(ctx, in interface{}, opts ...interface{}) *gomock.Call {
  147. mr.mock.ctrl.T.Helper()
  148. varargs := append([]interface{}{ctx, in}, opts...)
  149. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitOperation", reflect.TypeOf((*MockOperationsClient)(nil).WaitOperation), varargs...)
  150. }
  151. // MockOperationsServer is a mock of OperationsServer interface
  152. type MockOperationsServer struct {
  153. ctrl *gomock.Controller
  154. recorder *MockOperationsServerMockRecorder
  155. }
  156. // MockOperationsServerMockRecorder is the mock recorder for MockOperationsServer
  157. type MockOperationsServerMockRecorder struct {
  158. mock *MockOperationsServer
  159. }
  160. // NewMockOperationsServer creates a new mock instance
  161. func NewMockOperationsServer(ctrl *gomock.Controller) *MockOperationsServer {
  162. mock := &MockOperationsServer{ctrl: ctrl}
  163. mock.recorder = &MockOperationsServerMockRecorder{mock}
  164. return mock
  165. }
  166. // EXPECT returns an object that allows the caller to indicate expected use
  167. func (m *MockOperationsServer) EXPECT() *MockOperationsServerMockRecorder {
  168. return m.recorder
  169. }
  170. // ListOperations mocks base method
  171. func (m *MockOperationsServer) ListOperations(arg0 context.Context, arg1 *longrunning.ListOperationsRequest) (*longrunning.ListOperationsResponse, error) {
  172. m.ctrl.T.Helper()
  173. ret := m.ctrl.Call(m, "ListOperations", arg0, arg1)
  174. ret0, _ := ret[0].(*longrunning.ListOperationsResponse)
  175. ret1, _ := ret[1].(error)
  176. return ret0, ret1
  177. }
  178. // ListOperations indicates an expected call of ListOperations
  179. func (mr *MockOperationsServerMockRecorder) ListOperations(arg0, arg1 interface{}) *gomock.Call {
  180. mr.mock.ctrl.T.Helper()
  181. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockOperationsServer)(nil).ListOperations), arg0, arg1)
  182. }
  183. // GetOperation mocks base method
  184. func (m *MockOperationsServer) GetOperation(arg0 context.Context, arg1 *longrunning.GetOperationRequest) (*longrunning.Operation, error) {
  185. m.ctrl.T.Helper()
  186. ret := m.ctrl.Call(m, "GetOperation", arg0, arg1)
  187. ret0, _ := ret[0].(*longrunning.Operation)
  188. ret1, _ := ret[1].(error)
  189. return ret0, ret1
  190. }
  191. // GetOperation indicates an expected call of GetOperation
  192. func (mr *MockOperationsServerMockRecorder) GetOperation(arg0, arg1 interface{}) *gomock.Call {
  193. mr.mock.ctrl.T.Helper()
  194. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockOperationsServer)(nil).GetOperation), arg0, arg1)
  195. }
  196. // DeleteOperation mocks base method
  197. func (m *MockOperationsServer) DeleteOperation(arg0 context.Context, arg1 *longrunning.DeleteOperationRequest) (*emptypb.Empty, error) {
  198. m.ctrl.T.Helper()
  199. ret := m.ctrl.Call(m, "DeleteOperation", arg0, arg1)
  200. ret0, _ := ret[0].(*emptypb.Empty)
  201. ret1, _ := ret[1].(error)
  202. return ret0, ret1
  203. }
  204. // DeleteOperation indicates an expected call of DeleteOperation
  205. func (mr *MockOperationsServerMockRecorder) DeleteOperation(arg0, arg1 interface{}) *gomock.Call {
  206. mr.mock.ctrl.T.Helper()
  207. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOperation", reflect.TypeOf((*MockOperationsServer)(nil).DeleteOperation), arg0, arg1)
  208. }
  209. // CancelOperation mocks base method
  210. func (m *MockOperationsServer) CancelOperation(arg0 context.Context, arg1 *longrunning.CancelOperationRequest) (*emptypb.Empty, error) {
  211. m.ctrl.T.Helper()
  212. ret := m.ctrl.Call(m, "CancelOperation", arg0, arg1)
  213. ret0, _ := ret[0].(*emptypb.Empty)
  214. ret1, _ := ret[1].(error)
  215. return ret0, ret1
  216. }
  217. // CancelOperation indicates an expected call of CancelOperation
  218. func (mr *MockOperationsServerMockRecorder) CancelOperation(arg0, arg1 interface{}) *gomock.Call {
  219. mr.mock.ctrl.T.Helper()
  220. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelOperation", reflect.TypeOf((*MockOperationsServer)(nil).CancelOperation), arg0, arg1)
  221. }
  222. // WaitOperation mocks base method
  223. func (m *MockOperationsServer) WaitOperation(arg0 context.Context, arg1 *longrunning.WaitOperationRequest) (*longrunning.Operation, error) {
  224. m.ctrl.T.Helper()
  225. ret := m.ctrl.Call(m, "WaitOperation", arg0, arg1)
  226. ret0, _ := ret[0].(*longrunning.Operation)
  227. ret1, _ := ret[1].(error)
  228. return ret0, ret1
  229. }
  230. // WaitOperation indicates an expected call of WaitOperation
  231. func (mr *MockOperationsServerMockRecorder) WaitOperation(arg0, arg1 interface{}) *gomock.Call {
  232. mr.mock.ctrl.T.Helper()
  233. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitOperation", reflect.TypeOf((*MockOperationsServer)(nil).WaitOperation), arg0, arg1)
  234. }