1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-26 13:48:49 +08:00
hybridgroup.gobot/test_helper.go
2013-12-30 17:22:16 -08:00

33 lines
650 B
Go

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
d.Commands = []string{
"DriverCommand1",
"DriverCommand2",
"DriverCommand3",
}
return d
}
func newTestAdaptor(name string) *testAdaptor {
a := new(testAdaptor)
a.Name = name
return a
}