test code

This commit is contained in:
geek 2017-06-09 17:01:09 +09:00
parent e721ac5b47
commit 65eadd89c3
4 changed files with 51 additions and 1 deletions

View File

@ -1 +1,18 @@
package sensor 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)
}

View File

@ -2,10 +2,10 @@ package sensorItem
import ( import (
"encoding/json" "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/sensorItemCategory"
"git.loafle.net/overflow/overflow_proxy_service/proxy/utils" "git.loafle.net/overflow/overflow_proxy_service/proxy/utils"
"github.com/golang/protobuf/ptypes/timestamp" "github.com/golang/protobuf/ptypes/timestamp"
"git.loafle.net/overflow/overflow_proxy_service/proxy/crawler"
) )
type SensorItem struct { type SensorItem struct {

View File

@ -1 +1,18 @@
package sensorItem 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)
}

View File

@ -1 +1,17 @@
package sensorItemMapping 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)
}