gobot.io/x/gobot/v2@v2.1.0/platforms/firmata/ble_firmata_adaptor_test.go (about)

     1  //go:build !windows
     2  // +build !windows
     3  
     4  package firmata
     5  
     6  import (
     7  	"strings"
     8  	"testing"
     9  
    10  	"gobot.io/x/gobot/v2"
    11  	"gobot.io/x/gobot/v2/gobottest"
    12  )
    13  
    14  var _ gobot.Adaptor = (*BLEAdaptor)(nil)
    15  
    16  func initTestBLEAdaptor() *BLEAdaptor {
    17  	a := NewBLEAdaptor("DEVICE", "123", "456")
    18  	return a
    19  }
    20  
    21  func TestFirmataBLEAdaptor(t *testing.T) {
    22  	a := initTestBLEAdaptor()
    23  	gobottest.Assert(t, strings.HasPrefix(a.Name(), "BLEFirmata"), true)
    24  }