1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00
hybridgroup.gobot/platforms/digispark/digispark_adaptor_test.go

33 lines
709 B
Go
Raw Normal View History

2014-04-28 04:23:15 -07:00
package digispark
import (
2014-06-12 16:15:06 -07:00
"github.com/hybridgroup/gobot"
"testing"
)
2014-06-13 16:01:39 -07:00
func initTestDigisparkAdaptor() *DigisparkAdaptor {
a := NewDigisparkAdaptor("bot")
a.connect = func(a *DigisparkAdaptor) {}
return a
2014-06-12 16:15:06 -07:00
}
2014-06-13 16:01:39 -07:00
func TestDigisparkAdaptorFinalize(t *testing.T) {
a := initTestDigisparkAdaptor()
gobot.Assert(t, a.Finalize(), true)
2014-06-12 16:15:06 -07:00
}
2014-06-13 16:01:39 -07:00
func TestDigisparkAdaptorConnect(t *testing.T) {
a := initTestDigisparkAdaptor()
gobot.Assert(t, a.Connect(), true)
2014-06-12 16:15:06 -07:00
}
2014-06-13 16:01:39 -07:00
func TestDigisparkAdaptorDisconnect(t *testing.T) {
a := initTestDigisparkAdaptor()
gobot.Assert(t, a.Disconnect(), true)
2014-06-12 16:15:06 -07:00
}
2014-06-13 16:01:39 -07:00
func TestDigisparkAdaptorReconnect(t *testing.T) {
a := initTestDigisparkAdaptor()
gobot.Assert(t, a.Reconnect(), true)
2014-06-12 16:15:06 -07:00
}