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

Function TestDeclareBinding

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

Source from the content-addressed store, hash-verified

84}
85
86func TestDeclareBinding(t *testing.T) {
87 var ok bool
88
89 b := Binding{
90 Queue: &Queue{Name: "lol1"},
91 Exchange: Exchange{Name: "lol2"},
92 Key: "ololoev",
93 }
94
95 td := &testDeclarer{
96 _QueueBind: func() error {
97 ok = true
98 return nil
99 },
100 }
101
102 DeclareBinding(b)(td)
103
104 if !ok {
105 t.Error("DeclareBinding() should call declarer.QueueBind()")
106 }
107}

Callers

nothing calls this directly

Calls 1

DeclareBindingFunction · 0.85

Tested by

no test coverage detected