hybridgroup.gobot/platforms/firmata/tcp_firmata_adaptor_test.go

22 lines
377 B
Go
Raw Permalink Normal View History

package firmata
import (
"strings"
"testing"
"gobot.io/x/gobot"
"gobot.io/x/gobot/gobottest"
)
var _ gobot.Adaptor = (*TCPAdaptor)(nil)
func initTestTCPAdaptor() *TCPAdaptor {
a := NewTCPAdaptor("localhost:4567")
return a
}
func TestFirmataTCPAdaptor(t *testing.T) {
a := initTestTCPAdaptor()
gobottest.Assert(t, strings.HasPrefix(a.Name(), "TCPFirmata"), true)
}