Example #1
0
func TestRunHandlersWithNoData(t *testing.T) {
	b := New()
	name := "testEvent"
	b.AddHandlers(name, h1, h2, h3, h4)
	e := event.New(name)
	b.Post(e)
}
Example #2
0
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)
	}
}