1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-13 19:29:10 +08:00
hybridgroup.gobot/platforms/microbit/led_driver_test.go
deadprogram 44de8014c5 microbit: initial implementation for LEDs
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-02-28 19:40:16 +01:00

24 lines
426 B
Go

package microbit
import (
"strings"
"testing"
"gobot.io/x/gobot"
"gobot.io/x/gobot/gobottest"
"gobot.io/x/gobot/platforms/ble"
)
var _ gobot.Driver = (*LEDDriver)(nil)
func initTestLEDDriver() *LEDDriver {
d := NewLEDDriver(ble.NewClientAdaptor("D7:99:5A:26:EC:38"))
return d
}
func TestLEDDriver(t *testing.T) {
d := initTestLEDDriver()
gobottest.Assert(t, strings.HasPrefix(d.Name(), "Microbit LED"), true)
}