1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-02 22:17:12 +08:00
hybridgroup.gobot/platforms/beaglebone/beaglebone_adaptor_test.go

30 lines
699 B
Go
Raw Normal View History

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