25 lines
440 B
Go
25 lines
440 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.Expect(t, a.Connect(), true)
|
|
}
|
|
|
|
func TestFinalize(t *testing.T) {
|
|
a := initTestArdroneAdaptor()
|
|
gobot.Expect(t, a.Finalize(), true)
|
|
}
|