25 lines
438 B
Go
25 lines
438 B
Go
package ardrone
|
|
|
|
import (
|
|
"github.com/hybridgroup/gobot"
|
|
"testing"
|
|
)
|
|
|
|
func initTestArdroneAdaptor() *ArdroneAdaptor {
|
|
a := NewArdroneAdaptor("drone")
|
|
a.connect = func(a *ArdroneAdaptor) {
|
|
a.drone = &testDrone{}
|
|
}
|
|
return a
|
|
}
|
|
|
|
func TestConnect(t *testing.T) {
|
|
a := initTestArdroneAdaptor()
|
|
gobot.Assert(t, a.Connect(), nil)
|
|
}
|
|
|
|
func TestFinalize(t *testing.T) {
|
|
a := initTestArdroneAdaptor()
|
|
gobot.Assert(t, a.Finalize(), nil)
|
|
}
|