1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00
hybridgroup.gobot/test_helper.go

33 lines
650 B
Go
Raw Normal View History

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
}