소스 검색

verify building message

master
Patrick Peng Sun 8 년 전
부모
커밋
12282ea8e9
1개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. +11
    -4
      outMsg_test.go

+ 11
- 4
outMsg_test.go 파일 보기

@@ -3,9 +3,16 @@ package main
import "testing"

func TestBuildTxtMsg(t *testing.T) {
BuildTextMsg("你好", "oUN420bxqFqlx0ZQHciUOesZO3PE")
SetupConfig()
s, _ := BuildTextMsg("你好", "oUN420bxqFqlx0ZQHciUOesZO3PE")
e := ReadEncryptedMsg(s)
sd := Decode(e.Encrypt)
h := ReadCommonHeader(sd)
m := ReadTextMsg(sd)
AssertEqual(t, m.Content, "你好", "Message content => wrong")
AssertEqual(t, h.ToUserName, "oUN420bxqFqlx0ZQHciUOesZO3PE", "ToUserName => wrong")
}

func TextCalculateSignature (t *testing.T ){
}
func TestCalculateSignature(t *testing.T) {
}

Loading…
취소
저장