1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-01 13:48:57 +08:00
hybridgroup.gobot/platforms/ble/ble_adaptor_test.go
2016-02-16 15:32:14 -08:00

22 lines
450 B
Go

package ble
import (
"testing"
"github.com/hybridgroup/gobot"
)
func initTestBLEAdaptor() *BLEAdaptor {
a := NewBLEAdaptor("bot", "D7:99:5A:26:EC:38")
// a.connect = func(n *BLEAdaptor) (io.ReadWriteCloser, error) {
// return &NullReadWriteCloser{}, nil
// }
return a
}
func TestBLEAdaptor(t *testing.T) {
a := NewBLEAdaptor("bot", "D7:99:5A:26:EC:38")
gobot.Assert(t, a.Name(), "bot")
gobot.Assert(t, a.UUID(), "D7:99:5A:26:EC:38")
}