mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-09 19:29:27 +08:00
29 lines
485 B
Go
29 lines
485 B
Go
package pebble
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"gobot.io/x/gobot/v2"
|
|
)
|
|
|
|
var _ gobot.Adaptor = (*Adaptor)(nil)
|
|
|
|
func initTestAdaptor() *Adaptor {
|
|
return NewAdaptor()
|
|
}
|
|
|
|
func TestAdaptor(t *testing.T) {
|
|
a := initTestAdaptor()
|
|
assert.Equal(t, "Pebble", a.Name())
|
|
}
|
|
func TestAdaptorConnect(t *testing.T) {
|
|
a := initTestAdaptor()
|
|
assert.Nil(t, a.Connect())
|
|
}
|
|
|
|
func TestAdaptorFinalize(t *testing.T) {
|
|
a := initTestAdaptor()
|
|
assert.Nil(t, a.Finalize())
|
|
}
|