MCPcopy Create free account
hub / github.com/DNAProject/DNA / TestMsgRouter

Function TestMsgRouter

p2pserver/message/utils/msg_router_test.go:40–49  ·  view source on GitHub ↗

TestMsgRouter tests a basic function of a message router

(t *testing.T)

Source from the content-addressed store, hash-verified

38
39// TestMsgRouter tests a basic function of a message router
40func TestMsgRouter(t *testing.T) {
41 network := netserver.NewNetServer()
42 msgRouter := NewMsgRouter(network)
43 assert.NotNil(t, msgRouter)
44
45 msgRouter.RegisterMsgHandler("test", testHandler)
46 msgRouter.UnRegisterMsgHandler("test")
47 msgRouter.Start()
48 msgRouter.Stop()
49}

Callers

nothing calls this directly

Calls 6

NewNetServerFunction · 0.92
NewMsgRouterFunction · 0.85
RegisterMsgHandlerMethod · 0.80
UnRegisterMsgHandlerMethod · 0.80
StartMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected