diff options
author | Rastislav Szabo <raszabo@cisco.com> | 2017-05-22 13:59:34 +0200 |
---|---|---|
committer | Rastislav Szabo <raszabo@cisco.com> | 2017-05-22 14:00:46 +0200 |
commit | c38cb25d746736f062ee16e87f553c8a4ec5fced (patch) | |
tree | 231a1befaff3b83b020461e584e9de27a39d06a4 /core/core_test.go | |
parent | c60a4ee4e6114ff0dc3cbc9fd9a58321ca2a8abc (diff) |
binapi-generator renamed & moved, finished documentation
Change-Id: I7d3b53fa238e822b36a6a82c61ffb792da3898bf
Signed-off-by: Rastislav Szabo <raszabo@cisco.com>
Diffstat (limited to 'core/core_test.go')
-rw-r--r-- | core/core_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/core_test.go b/core/core_test.go index 8bf9311..d3c2e2c 100644 --- a/core/core_test.go +++ b/core/core_test.go @@ -144,6 +144,20 @@ func TestNotifications(t *testing.T) { Expect(err).ShouldNot(HaveOccurred()) } +func TestNilConnection(t *testing.T) { + var conn *Connection + + ch, err := conn.NewAPIChannel() + Expect(ch).Should(BeNil()) + Expect(err).Should(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("nil")) + + ch, err = conn.NewAPIChannelBuffered(1, 1) + Expect(ch).Should(BeNil()) + Expect(err).Should(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("nil")) +} + func TestDoubleConnection(t *testing.T) { ctx := setupTest(t) defer ctx.teardownTest() |