hybridgroup.gobot/platforms/sphero/sphero_driver_test.go

23 lines
446 B
Go

package sphero
import (
"github.com/hybridgroup/gobot"
"testing"
)
func initTestSpheroDriver() *SpheroDriver {
a := NewSpheroAdaptor("bot", "/dev/null")
a.sp = gobot.NullReadWriteCloser{}
return NewSpheroDriver(a, "bot")
}
func TestSpheroDriverStart(t *testing.T) {
d := initTestSpheroDriver()
gobot.Expect(t, d.Start(), true)
}
func TestSpheroDriverHalt(t *testing.T) {
d := initTestSpheroDriver()
gobot.Expect(t, d.Halt(), true)
}