Add observer mock

This commit is contained in:
9seconds
2021-03-16 10:51:43 +03:00
parent b08d945d7c
commit f0063ba089
2 changed files with 40 additions and 15 deletions
+22
View File
@@ -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()
}