mock_operation_server_test.go 4.7 KB

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