(t *testing.T)
| 65 | } |
| 66 | |
| 67 | func 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 | |
| 86 | func TestDeclareBinding(t *testing.T) { |
| 87 | var ok bool |
nothing calls this directly
no test coverage detected