Add test conntraffic

This commit is contained in:
9seconds
2021-04-02 12:40:22 +03:00
parent 784a5818c8
commit 7e7823118e
2 changed files with 164 additions and 0 deletions
+14
View File
@@ -1,5 +1,11 @@
package mtglib
import (
"context"
"github.com/stretchr/testify/mock"
)
type NoopLogger struct{}
func (n NoopLogger) Named(_ string) Logger { return n }
@@ -12,3 +18,11 @@ func (n NoopLogger) Debug(_ string) {}
func (n NoopLogger) InfoError(_ string, _ error) {}
func (n NoopLogger) WarningError(_ string, _ error) {}
func (n NoopLogger) DebugError(_ string, _ error) {}
type EventStreamMock struct {
mock.Mock
}
func (e *EventStreamMock) Send(ctx context.Context, evt Event) {
e.Called(ctx, evt)
}