(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestBadChan(t *testing.T) { |
| 35 | s := RunDefaultServer() |
| 36 | defer s.Shutdown() |
| 37 | |
| 38 | ec := NewEConn(t) |
| 39 | defer ec.Close() |
| 40 | |
| 41 | if err := ec.BindSendChan("foo", "not a chan"); err == nil { |
| 42 | t.Fatalf("Expected an Error when sending a non-channel\n") |
| 43 | } |
| 44 | |
| 45 | if _, err := ec.BindRecvChan("foo", "not a chan"); err == nil { |
| 46 | t.Fatalf("Expected an Error when sending a non-channel\n") |
| 47 | } |
| 48 | |
| 49 | if err := ec.BindSendChan("foo", "not a chan"); err != nats.ErrChanArg { |
| 50 | t.Fatalf("Expected an ErrChanArg when sending a non-channel\n") |
| 51 | } |
| 52 | |
| 53 | if _, err := ec.BindRecvChan("foo", "not a chan"); err != nats.ErrChanArg { |
| 54 | t.Fatalf("Expected an ErrChanArg when sending a non-channel\n") |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | func TestSimpleSendChan(t *testing.T) { |
| 59 | s := RunDefaultServer() |
nothing calls this directly
no test coverage detected