From 5133036e9f297019771d4aeac7f961cbb57406ec Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 22 五月 2019 13:11:37 +0800
Subject: [PATCH] add api
---
api_test.go | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/api_test.go b/api_test.go
index 639a7e3..1158431 100644
--- a/api_test.go
+++ b/api_test.go
@@ -1,6 +1,7 @@
package dbapi
import (
+ "dbapi/protomsg"
"fmt"
"testing"
)
@@ -13,7 +14,7 @@
func TestAreaAdd(t *testing.T) {
var api AreaApi
- var area = Area{
+ var area = protomsg.Area{
Parentid: 0,
Name: "鍝堝搱鍝�",
}
@@ -24,7 +25,7 @@
func TestAreaUpdate(t *testing.T) {
var api AreaApi
- var area = Area{
+ var area = protomsg.Area{
Id: 1,
Name: "鍖哄煙鏇存柊娴嬭瘯",
Parentid: 0,
@@ -54,6 +55,12 @@
func TestSdkApi_GetById(t *testing.T) {
var api SdkApi
model := api.GetById("812b674b-2375-4589-919a-5c1c3278a97e")
+ fmt.Printf("sdkArgs:%s \n",model.Args)
+
+ //if err := json.Unmarshal([]byte(model.Args), &sdkArgs);err !=nil {
+ // fmt.Println(err)
+ //}
+
fmt.Println(model)
}
@@ -67,4 +74,10 @@
var api TaskApi
taskInfos := api.FindAll()
fmt.Println(taskInfos)
+}
+
+func TestCameraApi_FindAll(t *testing.T) {
+ var api CameraApi
+ cameras := api.FindAll()
+ fmt.Println(cameras)
}
\ No newline at end of file
--
Gitblit v1.8.0