2015-06-07 12:38:19 -07:00
|
|
|
package ble
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2016-07-03 11:15:42 +02:00
|
|
|
"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")
|
2016-07-03 11:15:42 +02:00
|
|
|
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
|
|
|
}
|