From f0d5b15c56a7416b8636e4e68ef28179a05812e3 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 12 六月 2019 09:36:08 +0800
Subject: [PATCH] cameraTaskArgs with vue

---
 api_test.go |   42 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/api_test.go b/api_test.go
index 639a7e3..3473da0 100644
--- a/api_test.go
+++ b/api_test.go
@@ -1,8 +1,10 @@
 package dbapi
 
 import (
+	"analyweb/protomsg"
 	"fmt"
 	"testing"
+	"time"
 )
 
 func TestGetLocalCameraTree(t *testing.T) {
@@ -13,7 +15,7 @@
 
 func TestAreaAdd(t *testing.T) {
 	var api AreaApi
-	var area = Area{
+	var area = protomsg.Area{
 		Parentid: 0,
 		Name:     "鍝堝搱鍝�",
 	}
@@ -24,7 +26,7 @@
 
 func TestAreaUpdate(t *testing.T) {
 	var api AreaApi
-	var area = Area{
+	var area = protomsg.Area{
 		Id:       1,
 		Name:     "鍖哄煙鏇存柊娴嬭瘯",
 		Parentid: 0,
@@ -39,10 +41,34 @@
 	fmt.Println(camera)
 }
 
-func TestMangosReqClient(t *testing.T){
-	var client ReqrepApi
+func TestCameraApi_Add(t *testing.T) {
+	var api CameraApi
+	camera := protomsg.Camera{
+		Name:"娴嬭瘯鍟婂晩鍟婂晩鍟婂晩鍟婂晩",
+		Areaid:0,
+	}
+	result := api.CameraAdd(camera)
+	fmt.Println("add result: ",result)
 
-	client.SendRequestAndGetReply("one")
+}
+
+func TestSdkApi_Save(t *testing.T) {
+	for {
+		time.Sleep(10 * time.Second)
+		var api SdkApi
+		sdk := protomsg.Sdk{
+			SdkName:"awfewagewag",
+			Icon:"bbb",
+			Url:"baidu",
+		}
+		result := api.Save(sdk)
+		fmt.Println("add result: ",result)
+	}
+
+}
+
+func TestMangosReqClient(t *testing.T){
+
 }
 
 func TestSdkApi_FindAll(t *testing.T) {
@@ -67,4 +93,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