github.com/anycable/anycable-go@v1.5.1/mocks/Broadcaster.go (about) 1 // Code generated by mockery v2.20.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // Broadcaster is an autogenerated mock type for the Broadcaster type 12 type Broadcaster struct { 13 mock.Mock 14 } 15 16 // IsFanout provides a mock function with given fields: 17 func (_m *Broadcaster) IsFanout() bool { 18 ret := _m.Called() 19 20 var r0 bool 21 if rf, ok := ret.Get(0).(func() bool); ok { 22 r0 = rf() 23 } else { 24 r0 = ret.Get(0).(bool) 25 } 26 27 return r0 28 } 29 30 // Shutdown provides a mock function with given fields: ctx 31 func (_m *Broadcaster) Shutdown(ctx context.Context) error { 32 ret := _m.Called(ctx) 33 34 var r0 error 35 if rf, ok := ret.Get(0).(func(context.Context) error); ok { 36 r0 = rf(ctx) 37 } else { 38 r0 = ret.Error(0) 39 } 40 41 return r0 42 } 43 44 // Start provides a mock function with given fields: done 45 func (_m *Broadcaster) Start(done chan error) error { 46 ret := _m.Called(done) 47 48 var r0 error 49 if rf, ok := ret.Get(0).(func(chan error) error); ok { 50 r0 = rf(done) 51 } else { 52 r0 = ret.Error(0) 53 } 54 55 return r0 56 } 57 58 type mockConstructorTestingTNewBroadcaster interface { 59 mock.TestingT 60 Cleanup(func()) 61 } 62 63 // NewBroadcaster creates a new instance of Broadcaster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 64 func NewBroadcaster(t mockConstructorTestingTNewBroadcaster) *Broadcaster { 65 mock := &Broadcaster{} 66 mock.Mock.Test(t) 67 68 t.Cleanup(func() { mock.AssertExpectations(t) }) 69 70 return mock 71 }