2016-07-14 01:01:36 +08:00
|
|
|
package bebop
|
|
|
|
|
2017-04-06 17:08:02 +08:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"gobot.io/x/gobot"
|
|
|
|
"gobot.io/x/gobot/gobottest"
|
|
|
|
)
|
2016-07-14 01:01:36 +08:00
|
|
|
|
2016-09-25 22:05:24 +08:00
|
|
|
var _ gobot.Driver = (*Driver)(nil)
|
2017-04-06 17:08:02 +08:00
|
|
|
|
|
|
|
func TestBebopDriverName(t *testing.T) {
|
|
|
|
a := initTestBebopAdaptor()
|
|
|
|
d := NewDriver(a)
|
|
|
|
gobottest.Assert(t, strings.HasPrefix(d.Name(), "Bebop"), true)
|
|
|
|
d.SetName("NewName")
|
|
|
|
gobottest.Assert(t, d.Name(), "NewName")
|
|
|
|
}
|