mirror of
https://github.com/eventials/goevents.git
synced 2025-05-11 19:29:17 +08:00
23 lines
312 B
Go
23 lines
312 B
Go
package mock
|
|
|
|
import (
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
type Producer struct {
|
|
mock.Mock
|
|
}
|
|
|
|
func (p *Producer) Publish(action string, data []byte) {
|
|
p.Called(action, data)
|
|
}
|
|
|
|
func (p *Producer) Close() {
|
|
p.Called()
|
|
}
|
|
|
|
func (p *Producer) NotifyClose() <-chan bool {
|
|
p.Called()
|
|
return make(chan bool)
|
|
}
|