You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
569 B
Go
39 lines
569 B
Go
package namespace
|
|
|
|
import (
|
|
"caj-larsson/bog/util"
|
|
"testing"
|
|
)
|
|
|
|
func TestEventTest(t *testing.T) {
|
|
eb := util.NewEventBus()
|
|
svc := NamespaceService{}
|
|
|
|
svc.Wire(eb.Register, eb.Handle)
|
|
|
|
events := []util.Event{
|
|
*util.NewEvent("FileUsed", struct {
|
|
Name string
|
|
Size int64
|
|
}{
|
|
"asd",
|
|
int64(12),
|
|
}),
|
|
*util.NewEvent("FileDeleted", struct {
|
|
Name string
|
|
Size int64
|
|
}{
|
|
"asd",
|
|
int64(12),
|
|
}),
|
|
*util.NewEvent("FileRecieved", struct {
|
|
Name string
|
|
Size int64
|
|
}{
|
|
"asd",
|
|
int64(12),
|
|
}),
|
|
}
|
|
util.AcceptsMessage(t, eb, events)
|
|
}
|