dragonboard: increase test coverage

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-04-06 11:10:58 +02:00
parent 2867e6b94b
commit 722e1b8e1c
1 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package dragonboard
import (
"errors"
"strings"
"testing"
"gobot.io/x/gobot"
@ -25,6 +26,13 @@ func initTestDragonBoardAdaptor(t *testing.T) *Adaptor {
return a
}
func TestDragonBoardAdaptorName(t *testing.T) {
a := initTestDragonBoardAdaptor(t)
gobottest.Assert(t, strings.HasPrefix(a.Name(), "DragonBoard"), true)
a.SetName("NewName")
gobottest.Assert(t, a.Name(), "NewName")
}
func TestDragonBoardAdaptorDigitalIO(t *testing.T) {
a := initTestDragonBoardAdaptor(t)
fs := sysfs.NewMockFilesystem([]string{