mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:04:02 +03:00
Add test conntraffic
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user