hybridgroup.gobot/platforms/sphero/sphero_adaptor_test.go

23 lines
506 B
Go
Raw Normal View History

2014-04-27 09:07:04 +08:00
package sphero
import (
2014-06-14 05:26:18 +08:00
"github.com/hybridgroup/gobot"
"testing"
)
2014-06-14 07:01:39 +08:00
func initTestSpheroAdaptor() *SpheroAdaptor {
a := NewSpheroAdaptor("bot", "/dev/null")
a.sp = gobot.NullReadWriteCloser{}
2014-11-20 08:17:14 +08:00
a.connect = func(a *SpheroAdaptor) (err error) { return nil }
2014-06-14 07:01:39 +08:00
return a
2014-06-14 05:26:18 +08:00
}
2014-06-14 07:01:39 +08:00
func TestSpheroAdaptorFinalize(t *testing.T) {
a := initTestSpheroAdaptor()
gobot.Assert(t, len(a.Finalize()), 0)
2014-06-14 05:26:18 +08:00
}
2014-06-14 07:01:39 +08:00
func TestSpheroAdaptorConnect(t *testing.T) {
a := initTestSpheroAdaptor()
gobot.Assert(t, len(a.Connect()), 0)
2014-06-14 05:26:18 +08:00
}