edison: increase test coverage
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
0ed755c6a4
commit
7639656968
|
@ -2,6 +2,7 @@ package edison
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gobot.io/x/gobot"
|
||||
|
@ -97,6 +98,13 @@ func initTestAdaptor() (*Adaptor, *sysfs.MockFilesystem) {
|
|||
return a, fs
|
||||
}
|
||||
|
||||
func TestEdisonAdaptorName(t *testing.T) {
|
||||
a, _ := initTestAdaptor()
|
||||
gobottest.Assert(t, strings.HasPrefix(a.Name(), "Edison"), true)
|
||||
a.SetName("NewName")
|
||||
gobottest.Assert(t, a.Name(), "NewName")
|
||||
}
|
||||
|
||||
func TestAdaptorConnect(t *testing.T) {
|
||||
a, _ := initTestAdaptor()
|
||||
gobottest.Assert(t, a.Connect(), nil)
|
||||
|
|
Loading…
Reference in New Issue