hybridgroup.gobot/platforms/ardrone/ardrone_adaptor_test.go

25 lines
438 B
Go
Raw Normal View History

2014-04-29 02:23:12 +08:00
package ardrone
import (
2014-06-13 07:07:40 +08:00
"github.com/hybridgroup/gobot"
"testing"
)
2014-06-15 04:55:12 +08:00
func initTestArdroneAdaptor() *ArdroneAdaptor {
2014-06-14 07:01:39 +08:00
a := NewArdroneAdaptor("drone")
a.connect = func(a *ArdroneAdaptor) {
2014-06-15 04:55:12 +08:00
a.drone = &testDrone{}
2014-06-13 07:07:40 +08:00
}
2014-06-15 04:55:12 +08:00
return a
2014-06-13 07:07:40 +08:00
}
2014-06-13 07:07:40 +08:00
func TestConnect(t *testing.T) {
2014-06-15 04:55:12 +08:00
a := initTestArdroneAdaptor()
gobot.Assert(t, a.Connect(), nil)
2014-06-13 07:07:40 +08:00
}
2014-06-15 04:55:12 +08:00
func TestFinalize(t *testing.T) {
a := initTestArdroneAdaptor()
gobot.Assert(t, a.Finalize(), nil)
2014-06-13 07:07:40 +08:00
}