Mock dispatcher for testing.

This commit is contained in:
Alex Bramley 2011-08-22 23:23:29 +01:00
parent 0d7d875b9f
commit 4e7f272b3f
1 changed files with 7 additions and 0 deletions

View File

@ -10,3 +10,10 @@ func setUp(t *testing.T) (*mockNetConn, *Conn) {
c.postConnect() c.postConnect()
return m, c return m, c
} }
// Mock dispatcher to verify that events are triggered successfully
type mockDispatcher func(string, ...interface{})
func (d mockDispatcher) Dispatch(name string, ev ...interface{}) {
d(name, ev...)
}