1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-06 19:29:15 +08:00
hybridgroup.gobot/platforms/ble/ble_client_adaptor_test.go

22 lines
468 B
Go
Raw Normal View History

2015-06-07 12:38:19 -07:00
package ble
import (
"testing"
"github.com/hybridgroup/gobot/gobottest"
2015-06-07 12:38:19 -07:00
)
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")
gobottest.Assert(t, a.Name(), "bot")
gobottest.Assert(t, a.UUID(), "D7:99:5A:26:EC:38")
2015-06-07 12:38:19 -07:00
}