mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-02 22:17:12 +08:00
22 lines
401 B
Go
22 lines
401 B
Go
package ble
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"gobot.io/x/gobot"
|
|
"gobot.io/x/gobot/gobottest"
|
|
)
|
|
|
|
var _ gobot.Driver = (*BatteryDriver)(nil)
|
|
|
|
func initTestBatteryDriver() *BatteryDriver {
|
|
d := NewBatteryDriver(NewClientAdaptor("D7:99:5A:26:EC:38"))
|
|
return d
|
|
}
|
|
|
|
func TestBatteryDriver(t *testing.T) {
|
|
d := initTestBatteryDriver()
|
|
gobottest.Assert(t, strings.HasPrefix(d.Name(), "Battery"), true)
|
|
}
|