hybridgroup.gobot/platforms/beaglebone/beaglebone_adaptor_test.go

30 lines
699 B
Go
Raw Normal View History

2014-04-28 19:39:51 +08:00
package beaglebone
import (
2014-06-13 07:12:38 +08:00
"github.com/hybridgroup/gobot"
"testing"
)
2014-06-14 07:01:39 +08:00
func initTestBeagleboneAdaptor() *BeagleboneAdaptor {
2014-07-01 10:50:28 +08:00
b := NewBeagleboneAdaptor("bot")
b.connect = func() {}
return b
2014-06-13 07:12:38 +08:00
}
2014-06-14 07:01:39 +08:00
func TestBeagleboneAdaptorFinalize(t *testing.T) {
a := initTestBeagleboneAdaptor()
gobot.Assert(t, a.Finalize(), true)
2014-06-13 07:12:38 +08:00
}
2014-06-14 07:01:39 +08:00
func TestBeagleboneAdaptorConnect(t *testing.T) {
a := initTestBeagleboneAdaptor()
gobot.Assert(t, a.Connect(), true)
2014-06-13 07:12:38 +08:00
}
2014-06-14 07:01:39 +08:00
func TestBeagleboneAdaptorDisconnect(t *testing.T) {
a := initTestBeagleboneAdaptor()
gobot.Assert(t, a.Disconnect(), true)
2014-06-13 07:12:38 +08:00
}
2014-06-14 07:01:39 +08:00
func TestBeagleboneAdaptorReconnect(t *testing.T) {
a := initTestBeagleboneAdaptor()
gobot.Assert(t, a.Reconnect(), true)
2014-06-13 07:12:38 +08:00
}