mock_operation_server_test.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: cloud.google.com/go/longrunning/autogen/longrunningpb (interfaces: OperationsServer)
  3. // Package cloudcas is a generated GoMock package.
  4. package cloudcas
  5. import (
  6. context "context"
  7. reflect "reflect"
  8. longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
  9. gomock "github.com/golang/mock/gomock"
  10. emptypb "google.golang.org/protobuf/types/known/emptypb"
  11. )
  12. // MockOperationsServer is a mock of OperationsServer interface.
  13. type MockOperationsServer struct {
  14. ctrl *gomock.Controller
  15. recorder *MockOperationsServerMockRecorder
  16. }
  17. // MockOperationsServerMockRecorder is the mock recorder for MockOperationsServer.
  18. type MockOperationsServerMockRecorder struct {
  19. mock *MockOperationsServer
  20. }
  21. // NewMockOperationsServer creates a new mock instance.
  22. func NewMockOperationsServer(ctrl *gomock.Controller) *MockOperationsServer {
  23. mock := &MockOperationsServer{ctrl: ctrl}
  24. mock.recorder = &MockOperationsServerMockRecorder{mock}
  25. return mock
  26. }
  27. // EXPECT returns an object that allows the caller to indicate expected use.
  28. func (m *MockOperationsServer) EXPECT() *MockOperationsServerMockRecorder {
  29. return m.recorder
  30. }
  31. // CancelOperation mocks base method.
  32. func (m *MockOperationsServer) CancelOperation(arg0 context.Context, arg1 *longrunningpb.CancelOperationRequest) (*emptypb.Empty, error) {
  33. m.ctrl.T.Helper()
  34. ret := m.ctrl.Call(m, "CancelOperation", arg0, arg1)
  35. ret0, _ := ret[0].(*emptypb.Empty)
  36. ret1, _ := ret[1].(error)
  37. return ret0, ret1
  38. }
  39. // CancelOperation indicates an expected call of CancelOperation.
  40. func (mr *MockOperationsServerMockRecorder) CancelOperation(arg0, arg1 interface{}) *gomock.Call {
  41. mr.mock.ctrl.T.Helper()
  42. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelOperation", reflect.TypeOf((*MockOperationsServer)(nil).CancelOperation), arg0, arg1)
  43. }
  44. // DeleteOperation mocks base method.
  45. func (m *MockOperationsServer) DeleteOperation(arg0 context.Context, arg1 *longrunningpb.DeleteOperationRequest) (*emptypb.Empty, error) {
  46. m.ctrl.T.Helper()
  47. ret := m.ctrl.Call(m, "DeleteOperation", arg0, arg1)
  48. ret0, _ := ret[0].(*emptypb.Empty)
  49. ret1, _ := ret[1].(error)
  50. return ret0, ret1
  51. }
  52. // DeleteOperation indicates an expected call of DeleteOperation.
  53. func (mr *MockOperationsServerMockRecorder) DeleteOperation(arg0, arg1 interface{}) *gomock.Call {
  54. mr.mock.ctrl.T.Helper()
  55. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOperation", reflect.TypeOf((*MockOperationsServer)(nil).DeleteOperation), arg0, arg1)
  56. }
  57. // GetOperation mocks base method.
  58. func (m *MockOperationsServer) GetOperation(arg0 context.Context, arg1 *longrunningpb.GetOperationRequest) (*longrunningpb.Operation, error) {
  59. m.ctrl.T.Helper()
  60. ret := m.ctrl.Call(m, "GetOperation", arg0, arg1)
  61. ret0, _ := ret[0].(*longrunningpb.Operation)
  62. ret1, _ := ret[1].(error)
  63. return ret0, ret1
  64. }
  65. // GetOperation indicates an expected call of GetOperation.
  66. func (mr *MockOperationsServerMockRecorder) GetOperation(arg0, arg1 interface{}) *gomock.Call {
  67. mr.mock.ctrl.T.Helper()
  68. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockOperationsServer)(nil).GetOperation), arg0, arg1)
  69. }
  70. // ListOperations mocks base method.
  71. func (m *MockOperationsServer) ListOperations(arg0 context.Context, arg1 *longrunningpb.ListOperationsRequest) (*longrunningpb.ListOperationsResponse, error) {
  72. m.ctrl.T.Helper()
  73. ret := m.ctrl.Call(m, "ListOperations", arg0, arg1)
  74. ret0, _ := ret[0].(*longrunningpb.ListOperationsResponse)
  75. ret1, _ := ret[1].(error)
  76. return ret0, ret1
  77. }
  78. // ListOperations indicates an expected call of ListOperations.
  79. func (mr *MockOperationsServerMockRecorder) ListOperations(arg0, arg1 interface{}) *gomock.Call {
  80. mr.mock.ctrl.T.Helper()
  81. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockOperationsServer)(nil).ListOperations), arg0, arg1)
  82. }
  83. // WaitOperation mocks base method.
  84. func (m *MockOperationsServer) WaitOperation(arg0 context.Context, arg1 *longrunningpb.WaitOperationRequest) (*longrunningpb.Operation, error) {
  85. m.ctrl.T.Helper()
  86. ret := m.ctrl.Call(m, "WaitOperation", arg0, arg1)
  87. ret0, _ := ret[0].(*longrunningpb.Operation)
  88. ret1, _ := ret[1].(error)
  89. return ret0, ret1
  90. }
  91. // WaitOperation indicates an expected call of WaitOperation.
  92. func (mr *MockOperationsServerMockRecorder) WaitOperation(arg0, arg1 interface{}) *gomock.Call {
  93. mr.mock.ctrl.T.Helper()
  94. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitOperation", reflect.TypeOf((*MockOperationsServer)(nil).WaitOperation), arg0, arg1)
  95. }