mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:04:02 +03:00
Add observer mock
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package events_test
|
||||
|
||||
import (
|
||||
"github.com/9seconds/mtg/v2/mtglib"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
type ObserverMock struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (o *ObserverMock) EventStart(evt mtglib.EventStart) {
|
||||
o.Called(evt)
|
||||
}
|
||||
|
||||
func (o *ObserverMock) EventFinish(evt mtglib.EventStart) {
|
||||
o.Called(evt)
|
||||
}
|
||||
|
||||
func (o *ObserverMock) Shutdown() {
|
||||
o.Called()
|
||||
}
|
||||
Reference in New Issue
Block a user