hybridgroup.gobot/platforms/firmata/ble_firmata_adaptor_test.go

26 lines
424 B
Go

//go:build !windows
// +build !windows
package firmata
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
"gobot.io/x/gobot/v2"
)
var _ gobot.Adaptor = (*BLEAdaptor)(nil)
func initTestBLEAdaptor() *BLEAdaptor {
a := NewBLEAdaptor("DEVICE", "123", "456")
return a
}
func TestFirmataBLEAdaptor(t *testing.T) {
a := initTestBLEAdaptor()
assert.True(t, strings.HasPrefix(a.Name(), "BLEFirmata"))
}