MCPcopy Create free account
hub / github.com/assembla/cony / TestDeclareExchange

Function TestDeclareExchange

declaration_test.go:67–84  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestDeclareExchange(t *testing.T) {
68 var ok bool
69
70 e := Exchange{Name: "ex1"}
71
72 td := &testDeclarer{
73 _ExchangeDeclare: func() error {
74 ok = true
75 return nil
76 },
77 }
78
79 DeclareExchange(e)(td)
80
81 if !ok {
82 t.Error("DeclareExchange() should call declarer.ExchangeDeclare()")
83 }
84}
85
86func TestDeclareBinding(t *testing.T) {
87 var ok bool

Callers

nothing calls this directly

Calls 1

DeclareExchangeFunction · 0.85

Tested by

no test coverage detected