2016-12-06 19:16:33 +01:00
|
|
|
package ollie
|
|
|
|
|
2016-12-23 09:36:47 +01:00
|
|
|
import (
|
2017-02-02 16:43:50 +01:00
|
|
|
"strings"
|
|
|
|
"testing"
|
2016-12-23 09:36:47 +01:00
|
|
|
|
2017-02-02 16:43:50 +01:00
|
|
|
"gobot.io/x/gobot"
|
|
|
|
"gobot.io/x/gobot/gobottest"
|
2016-12-23 09:36:47 +01:00
|
|
|
|
2017-02-02 16:43:50 +01:00
|
|
|
"gobot.io/x/gobot/platforms/ble"
|
2016-12-23 09:36:47 +01:00
|
|
|
)
|
2016-12-06 19:16:33 +01:00
|
|
|
|
|
|
|
var _ gobot.Driver = (*Driver)(nil)
|
2016-12-23 09:36:47 +01:00
|
|
|
|
|
|
|
func initTestOllieDriver() *Driver {
|
|
|
|
d := NewDriver(ble.NewClientAdaptor("D7:99:5A:26:EC:38"))
|
|
|
|
return d
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestOllieDriver(t *testing.T) {
|
|
|
|
d := initTestOllieDriver()
|
2017-02-02 16:43:50 +01:00
|
|
|
gobottest.Assert(t, strings.HasPrefix(d.Name(), "Ollie"), true)
|
2016-12-23 09:36:47 +01:00
|
|
|
}
|