1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-29 13:49:14 +08:00
hybridgroup.gobot/platforms/pebble/pebble_adaptor_test.go

29 lines
485 B
Go
Raw Normal View History

2014-05-02 17:22:05 -05:00
package pebble
import (
2014-06-13 14:18:57 -07:00
"testing"
"github.com/stretchr/testify/assert"
"gobot.io/x/gobot/v2"
2014-05-02 17:22:05 -05:00
)
var _ gobot.Adaptor = (*Adaptor)(nil)
func initTestAdaptor() *Adaptor {
return NewAdaptor()
2014-06-13 14:18:57 -07:00
}
2014-05-02 17:22:05 -05:00
func TestAdaptor(t *testing.T) {
a := initTestAdaptor()
assert.Equal(t, "Pebble", a.Name())
2014-12-17 14:04:18 -08:00
}
func TestAdaptorConnect(t *testing.T) {
a := initTestAdaptor()
assert.Nil(t, a.Connect())
2014-06-13 14:18:57 -07:00
}
2014-06-13 16:01:39 -07:00
func TestAdaptorFinalize(t *testing.T) {
a := initTestAdaptor()
assert.Nil(t, a.Finalize())
2014-06-13 14:18:57 -07:00
}