probe/service/SensorService_test.go
2018-07-09 15:59:55 +09:00

20 lines
694 B
Go

package service
import (
"testing"
"fmt"
)
func TestSensorService_AddSensor(t *testing.T) {
config := "3gX2rkyrn+R//wqs2IU+kqnWCfBkdik1gsAZHYvGYkXEaL1pivcyxNfzSVbUPW41+P5VrSM2+HQfcmTNXiO2V1bUm+cuzJ+iZvLjOodb5Hdji8isNCwy4WJ4aa8SD18qNCKvJFwrvNkEvhkRy9SNbJ2zw2zyiOSvweHauI03HYBEEvAIy6JBdMSrb6yzFJcWa1BUvkWTOqei+8blivC84tw0OAils1fUUbfRaRDNCrVVNJDqVhqa9ZUUbQ8ziNV5Qb0FeSEflqH1PzXSZ9OPV8LipC7Fdp6SLmGiPWXR/EhuSH9JeFkOPJuVH4+z3zyXthTo4hyafLjMGEhm0J0csh78zRk3pCG6LRt3llLW0cGHgwoIAQaAA4jR0R64/k12D4zB+O/iwTcPeW1mPN5myg=="
s := &SensorService{}
sc := &SensorConfigService{}
sc.InitService()
s.SensorConfigService = sc
err := s.AddSensor(config)
if nil != err {
fmt.Errorf(err.Error())
}
}