mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-26 13:48:49 +08:00
nats: minor increase test coverage for driver
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
937b0bc55c
commit
028ef8183d
@ -15,6 +15,7 @@ func TestNatsDriver(t *testing.T) {
|
||||
|
||||
gobottest.Assert(t, strings.HasPrefix(d.Name(), "NATS"), true)
|
||||
gobottest.Assert(t, strings.HasPrefix(d.Connection().Name(), "NATS"), true)
|
||||
gobottest.Refute(t, d.adaptor(), nil)
|
||||
|
||||
gobottest.Assert(t, d.Start(), nil)
|
||||
gobottest.Assert(t, d.Halt(), nil)
|
||||
@ -26,3 +27,9 @@ func TestNatsDriverName(t *testing.T) {
|
||||
d.SetName("NewName")
|
||||
gobottest.Assert(t, d.Name(), "NewName")
|
||||
}
|
||||
|
||||
func TestNatsDriverTopic(t *testing.T) {
|
||||
d := NewDriver(initTestNatsAdaptor(), "/test/topic")
|
||||
d.SetTopic("interestingtopic")
|
||||
gobottest.Assert(t, d.Topic(), "interestingtopic")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user