func TestRunHandlersWithNoData(t *testing.T) { b := New() name := "testEvent" b.AddHandlers(name, h1, h2, h3, h4) e := event.New(name) b.Post(e) }
func TestRunSynchHandlersWithData(t *testing.T) { b := New() name := "testEventSync" b.AddHandlers(name, handler) e := event.New(name) e.Data()["count"] = 23 if err := b.PostAndWait(e); err != nil { t.Errorf("The post failed with message: %v.\n", err) } }