hybridgroup.gobot/platforms/ble/ble_adaptor_test.go

22 lines
450 B
Go
Raw Normal View History

2015-06-08 03:38:19 +08:00
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")
}