package util import ( "github.com/matryer/is" "testing" ) func (eb *EventBus) Handled(e Event) bool { // TODO: figure out how to verify the event signature here. handlers, exists := eb.handlers[e.EventName()] if !exists { return false } return len(handlers) > 0 } func AcceptsMessage(t *testing.T, eb *EventBus, es []Event) { is := is.New(t) for _, e := range es { is.True(eb.Handled(e)) } }