test code
This commit is contained in:
parent
e721ac5b47
commit
65eadd89c3
|
@ -1 +1,18 @@
|
|||
package sensor
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/target"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSensorService_List(t *testing.T) {
|
||||
|
||||
ts := &target.Target{}
|
||||
ts.Id = json.Number("1")
|
||||
|
||||
ss := NewSensorService()
|
||||
res, _ := ss.List(ts)
|
||||
|
||||
t.Log(res)
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ package sensorItem
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.loafle.net/overflow/crawler_go"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/sensorItemCategory"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/utils"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/crawler"
|
||||
)
|
||||
|
||||
type SensorItem struct {
|
||||
|
|
|
@ -1 +1,18 @@
|
|||
package sensorItem
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/crawler"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSensorItemService_List(t *testing.T) {
|
||||
|
||||
cr := &crawler.Crawler{}
|
||||
cr.Id = json.Number("1")
|
||||
sis := NewSensorItemService()
|
||||
|
||||
res, _ := sis.List(cr)
|
||||
|
||||
t.Log(res)
|
||||
}
|
||||
|
|
|
@ -1 +1,17 @@
|
|||
package sensorItemMapping
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/sensor"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSensorItemMappingService_List(t *testing.T) {
|
||||
s := &sensor.Sensor{}
|
||||
s.Id = json.Number("1")
|
||||
|
||||
sims := NewSensorItemMappingService()
|
||||
res, _ := sims.List(s)
|
||||
|
||||
t.Log(res)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user