1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-14 19:29:32 +08:00
hybridgroup.gobot/platforms/sphero/ollie/ollie_driver_test.go
deadprogram 61aa6648d2 ollie: refactoring to use BLEConnector interface and provide tests
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-04-05 12:57:50 +02:00

28 lines
497 B
Go

package ollie
import (
"testing"
"gobot.io/x/gobot"
"gobot.io/x/gobot/gobottest"
)
var _ gobot.Driver = (*Driver)(nil)
func initTestOllieDriver() *Driver {
d := NewDriver(NewBleTestAdaptor())
return d
}
func TestOllieDriver(t *testing.T) {
d := initTestOllieDriver()
d.SetName("NewName")
gobottest.Assert(t, d.Name(), "NewName")
}
func TestOllieDriverStartAndHalt(t *testing.T) {
d := initTestOllieDriver()
gobottest.Assert(t, d.Start(), nil)
gobottest.Assert(t, d.Halt(), nil)
}