2018-07-02 08:44:53 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestSensorService_AddSensor(t *testing.T) {
|
2018-07-09 06:59:55 +00:00
|
|
|
config := "3gX2rkyrn+R//wqs2IU+kqnWCfBkdik1gsAZHYvGYkXEaL1pivcyxNfzSVbUPW41+P5VrSM2+HQfcmTNXiO2V1bUm+cuzJ+iZvLjOodb5Hdji8isNCwy4WJ4aa8SD18qNCKvJFwrvNkEvhkRy9SNbJ2zw2zyiOSvweHauI03HYBEEvAIy6JBdMSrb6yzFJcWa1BUvkWTOqei+8blivC84tw0OAils1fUUbfRaRDNCrVVNJDqVhqa9ZUUbQ8ziNV5Qb0FeSEflqH1PzXSZ9OPV8LipC7Fdp6SLmGiPWXR/EhuSH9JeFkOPJuVH4+z3zyXthTo4hyafLjMGEhm0J0csh78zRk3pCG6LRt3llLW0cGHgwoIAQaAA4jR0R64/k12D4zB+O/iwTcPeW1mPN5myg=="
|
2018-07-02 08:44:53 +00:00
|
|
|
|
|
|
|
s := &SensorService{}
|
2018-07-03 07:25:26 +00:00
|
|
|
sc := &SensorConfigService{}
|
|
|
|
sc.InitService()
|
2018-07-09 06:59:55 +00:00
|
|
|
s.SensorConfigService = sc
|
2018-07-02 08:44:53 +00:00
|
|
|
err := s.AddSensor(config)
|
|
|
|
|
|
|
|
if nil != err {
|
|
|
|
fmt.Errorf(err.Error())
|
|
|
|
}
|
|
|
|
}
|