mockHandler is a test handler that records calls.
| 8 | |
| 9 | // mockHandler is a test handler that records calls. |
| 10 | type mockHandler struct { |
| 11 | name string |
| 12 | onConnectResult Result |
| 13 | onPacketResult Result |
| 14 | connectCalled bool |
| 15 | packetCalled bool |
| 16 | disconnectCalled bool |
| 17 | } |
| 18 | |
| 19 | func newMockHandler(name string, connectAction, packetAction Action) *mockHandler { |
| 20 | return &mockHandler{ |
nothing calls this directly
no outgoing calls
no test coverage detected