2013-12-30 16:51:21 -08:00
|
|
|
package gobot
|
|
|
|
|
|
|
|
type testDriver struct {
|
|
|
|
Driver
|
|
|
|
}
|
|
|
|
|
|
|
|
func (me *testDriver) Start() bool { return true }
|
|
|
|
|
|
|
|
type testAdaptor struct {
|
|
|
|
Adaptor
|
|
|
|
}
|
|
|
|
|
|
|
|
func (me *testAdaptor) Finalize() bool { return true }
|
|
|
|
func (me *testAdaptor) Connect() bool { return true }
|
|
|
|
func (me *testAdaptor) Disconnect() bool { return true }
|
|
|
|
func (me *testAdaptor) Reconnect() bool { return true }
|
|
|
|
|
|
|
|
func newTestDriver(name string) *testDriver {
|
|
|
|
d := new(testDriver)
|
|
|
|
d.Name = name
|
2013-12-30 17:22:16 -08:00
|
|
|
d.Commands = []string{
|
|
|
|
"DriverCommand1",
|
|
|
|
"DriverCommand2",
|
|
|
|
"DriverCommand3",
|
|
|
|
}
|
2013-12-30 16:51:21 -08:00
|
|
|
return d
|
|
|
|
}
|
|
|
|
func newTestAdaptor(name string) *testAdaptor {
|
|
|
|
a := new(testAdaptor)
|
|
|
|
a.Name = name
|
|
|
|
return a
|
|
|
|
}
|