This commit is contained in:
邹宗楠
2022-08-24 15:44:19 +08:00
parent ca4ef5171d
commit 901cb2f486
2 changed files with 25 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ func TestPrintMsg(t *testing.T) {
t.Fatal(err)
}
context := CurPrinterHandler.getOrderContent(order, "13412345678",nil)
context := CurPrinterHandler.getOrderContent(order, "13412345678", nil)
//context := CurPrinterHandler.getOrderContentBig(order, "13412345678")
status, err := CurPrinterHandler.PrintMsg(jxcontext.AdminCtx, "218510310", "ztdpveyg", "test", context)
t.Log(utils.Format4Output(status, false))
@@ -36,7 +36,7 @@ func TestPrintMsg(t *testing.T) {
}
func TestRegisterPrinter(t *testing.T) {
newID1, newID2, err := CurPrinterHandler.RegisterPrinter(jxcontext.AdminCtx, "218510310", "ztdpveyg", "title")
newID1, newID2, err := CurPrinterHandler.RegisterPrinter(jxcontext.AdminCtx, "218510310", "ztdpveyg", "title", 1)
t.Log(newID1 + "," + newID2)
if err != nil {
t.Fatal(err)

View File

@@ -0,0 +1,23 @@
package jxprint
import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"testing"
)
func TestPrintMsg(t *testing.T) {
status, err := CurPrinterHandler.PrintMsg(jxcontext.AdminCtx, "20220818000001", "1", "test", "11")
t.Log(utils.Format4Output(status, false))
if err != nil {
t.Fatal(err)
}
}
func TestGetPrintStatus(t *testing.T) {
status, err := CurPrinterHandler.GetPrinterStatus(jxcontext.AdminCtx, "20220818000001", "1")
t.Log(utils.Format4Output(status, false))
if err != nil {
t.Fatal(err)
}
}