mock_popup_displayer_test.go 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package http
  5. import (
  6. "context"
  7. "github.com/mk6i/open-oscar-server/state"
  8. mock "github.com/stretchr/testify/mock"
  9. )
  10. // newMockPopupDisplayer creates a new instance of mockPopupDisplayer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  11. // The first argument is typically a *testing.T value.
  12. func newMockPopupDisplayer(t interface {
  13. mock.TestingT
  14. Cleanup(func())
  15. }) *mockPopupDisplayer {
  16. if helper, ok := t.(interface{ Helper() }); ok {
  17. helper.Helper()
  18. }
  19. mock := &mockPopupDisplayer{}
  20. mock.Mock.Test(t)
  21. t.Cleanup(func() {
  22. if helper, ok := t.(interface{ Helper() }); ok {
  23. helper.Helper()
  24. }
  25. mock.AssertExpectations(t)
  26. })
  27. return mock
  28. }
  29. // mockPopupDisplayer is an autogenerated mock type for the PopupDisplayer type
  30. type mockPopupDisplayer struct {
  31. mock.Mock
  32. }
  33. type mockPopupDisplayer_Expecter struct {
  34. mock *mock.Mock
  35. }
  36. func (_m *mockPopupDisplayer) EXPECT() *mockPopupDisplayer_Expecter {
  37. return &mockPopupDisplayer_Expecter{mock: &_m.Mock}
  38. }
  39. // Display provides a mock function for the type mockPopupDisplayer
  40. func (_mock *mockPopupDisplayer) Display(ctx context.Context, screenNames []state.IdentScreenName, message string, url string, width uint16, height uint16) error {
  41. ret := _mock.Called(ctx, screenNames, message, url, width, height)
  42. if len(ret) == 0 {
  43. panic("no return value specified for Display")
  44. }
  45. var r0 error
  46. if returnFunc, ok := ret.Get(0).(func(context.Context, []state.IdentScreenName, string, string, uint16, uint16) error); ok {
  47. r0 = returnFunc(ctx, screenNames, message, url, width, height)
  48. } else {
  49. r0 = ret.Error(0)
  50. }
  51. return r0
  52. }
  53. // mockPopupDisplayer_Display_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Display'
  54. type mockPopupDisplayer_Display_Call struct {
  55. *mock.Call
  56. }
  57. // Display is a helper method to define mock.On call
  58. // - ctx context.Context
  59. // - screenNames []state.IdentScreenName
  60. // - message string
  61. // - url string
  62. // - width uint16
  63. // - height uint16
  64. func (_e *mockPopupDisplayer_Expecter) Display(ctx any, screenNames any, message any, url any, width any, height any) *mockPopupDisplayer_Display_Call {
  65. return &mockPopupDisplayer_Display_Call{Call: _e.mock.On("Display", ctx, screenNames, message, url, width, height)}
  66. }
  67. func (_c *mockPopupDisplayer_Display_Call) Run(run func(ctx context.Context, screenNames []state.IdentScreenName, message string, url string, width uint16, height uint16)) *mockPopupDisplayer_Display_Call {
  68. _c.Call.Run(func(args mock.Arguments) {
  69. var arg0 context.Context
  70. if args[0] != nil {
  71. arg0 = args[0].(context.Context)
  72. }
  73. var arg1 []state.IdentScreenName
  74. if args[1] != nil {
  75. arg1 = args[1].([]state.IdentScreenName)
  76. }
  77. var arg2 string
  78. if args[2] != nil {
  79. arg2 = args[2].(string)
  80. }
  81. var arg3 string
  82. if args[3] != nil {
  83. arg3 = args[3].(string)
  84. }
  85. var arg4 uint16
  86. if args[4] != nil {
  87. arg4 = args[4].(uint16)
  88. }
  89. var arg5 uint16
  90. if args[5] != nil {
  91. arg5 = args[5].(uint16)
  92. }
  93. run(
  94. arg0,
  95. arg1,
  96. arg2,
  97. arg3,
  98. arg4,
  99. arg5,
  100. )
  101. })
  102. return _c
  103. }
  104. func (_c *mockPopupDisplayer_Display_Call) Return(err error) *mockPopupDisplayer_Display_Call {
  105. _c.Call.Return(err)
  106. return _c
  107. }
  108. func (_c *mockPopupDisplayer_Display_Call) RunAndReturn(run func(ctx context.Context, screenNames []state.IdentScreenName, message string, url string, width uint16, height uint16) error) *mockPopupDisplayer_Display_Call {
  109. _c.Call.Return(run)
  110. return _c
  111. }
  112. // DisplayAll provides a mock function for the type mockPopupDisplayer
  113. func (_mock *mockPopupDisplayer) DisplayAll(ctx context.Context, message string, url string, width uint16, height uint16) error {
  114. ret := _mock.Called(ctx, message, url, width, height)
  115. if len(ret) == 0 {
  116. panic("no return value specified for DisplayAll")
  117. }
  118. var r0 error
  119. if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, uint16, uint16) error); ok {
  120. r0 = returnFunc(ctx, message, url, width, height)
  121. } else {
  122. r0 = ret.Error(0)
  123. }
  124. return r0
  125. }
  126. // mockPopupDisplayer_DisplayAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisplayAll'
  127. type mockPopupDisplayer_DisplayAll_Call struct {
  128. *mock.Call
  129. }
  130. // DisplayAll is a helper method to define mock.On call
  131. // - ctx context.Context
  132. // - message string
  133. // - url string
  134. // - width uint16
  135. // - height uint16
  136. func (_e *mockPopupDisplayer_Expecter) DisplayAll(ctx any, message any, url any, width any, height any) *mockPopupDisplayer_DisplayAll_Call {
  137. return &mockPopupDisplayer_DisplayAll_Call{Call: _e.mock.On("DisplayAll", ctx, message, url, width, height)}
  138. }
  139. func (_c *mockPopupDisplayer_DisplayAll_Call) Run(run func(ctx context.Context, message string, url string, width uint16, height uint16)) *mockPopupDisplayer_DisplayAll_Call {
  140. _c.Call.Run(func(args mock.Arguments) {
  141. var arg0 context.Context
  142. if args[0] != nil {
  143. arg0 = args[0].(context.Context)
  144. }
  145. var arg1 string
  146. if args[1] != nil {
  147. arg1 = args[1].(string)
  148. }
  149. var arg2 string
  150. if args[2] != nil {
  151. arg2 = args[2].(string)
  152. }
  153. var arg3 uint16
  154. if args[3] != nil {
  155. arg3 = args[3].(uint16)
  156. }
  157. var arg4 uint16
  158. if args[4] != nil {
  159. arg4 = args[4].(uint16)
  160. }
  161. run(
  162. arg0,
  163. arg1,
  164. arg2,
  165. arg3,
  166. arg4,
  167. )
  168. })
  169. return _c
  170. }
  171. func (_c *mockPopupDisplayer_DisplayAll_Call) Return(err error) *mockPopupDisplayer_DisplayAll_Call {
  172. _c.Call.Return(err)
  173. return _c
  174. }
  175. func (_c *mockPopupDisplayer_DisplayAll_Call) RunAndReturn(run func(ctx context.Context, message string, url string, width uint16, height uint16) error) *mockPopupDisplayer_DisplayAll_Call {
  176. _c.Call.Return(run)
  177. return _c
  178. }