2014-05-03 06:22:05 +08:00
|
|
|
package pebble
|
|
|
|
|
|
|
|
import (
|
2014-06-14 05:18:57 +08:00
|
|
|
"testing"
|
2014-11-29 10:10:05 +08:00
|
|
|
|
2016-02-22 13:21:24 +08:00
|
|
|
"github.com/hybridgroup/gobot/gobottest"
|
2014-05-03 06:22:05 +08:00
|
|
|
)
|
|
|
|
|
2014-06-14 07:01:39 +08:00
|
|
|
func initTestPebbleAdaptor() *PebbleAdaptor {
|
|
|
|
return NewPebbleAdaptor("pebble")
|
2014-06-14 05:18:57 +08:00
|
|
|
}
|
2014-05-03 06:22:05 +08:00
|
|
|
|
2014-12-18 06:04:18 +08:00
|
|
|
func TestPebbleAdaptor(t *testing.T) {
|
|
|
|
a := initTestPebbleAdaptor()
|
2016-02-22 13:21:24 +08:00
|
|
|
gobottest.Assert(t, a.Name(), "pebble")
|
2014-12-18 06:04:18 +08:00
|
|
|
}
|
2014-06-14 07:01:39 +08:00
|
|
|
func TestPebbleAdaptorConnect(t *testing.T) {
|
|
|
|
a := initTestPebbleAdaptor()
|
2016-02-22 13:21:24 +08:00
|
|
|
gobottest.Assert(t, len(a.Connect()), 0)
|
2014-06-14 05:18:57 +08:00
|
|
|
}
|
2014-06-14 07:01:39 +08:00
|
|
|
|
|
|
|
func TestPebbleAdaptorFinalize(t *testing.T) {
|
|
|
|
a := initTestPebbleAdaptor()
|
2016-02-22 13:21:24 +08:00
|
|
|
gobottest.Assert(t, len(a.Finalize()), 0)
|
2014-06-14 05:18:57 +08:00
|
|
|
}
|