gobot.io/x/gobot/v2@v2.1.0/platforms/firmata/tcp_firmata_adaptor_test.go (about) 1 package firmata 2 3 import ( 4 "strings" 5 "testing" 6 7 "gobot.io/x/gobot/v2" 8 "gobot.io/x/gobot/v2/gobottest" 9 ) 10 11 var _ gobot.Adaptor = (*TCPAdaptor)(nil) 12 13 func initTestTCPAdaptor() *TCPAdaptor { 14 a := NewTCPAdaptor("localhost:4567") 15 return a 16 } 17 18 func TestFirmataTCPAdaptor(t *testing.T) { 19 a := initTestTCPAdaptor() 20 gobottest.Assert(t, strings.HasPrefix(a.Name(), "TCPFirmata"), true) 21 }