package main

import "testing"

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

func TestCalculateSignature(t *testing.T) {

}
