You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 satır
420B

  1. package main
  2. import "testing"
  3. func TestBuildTxtMsg(t *testing.T) {
  4. SetupConfig()
  5. s, _ := BuildTextMsg("你好", "oUN420bxqFqlx0ZQHciUOesZO3PE")
  6. sd := decryptToXML(s)
  7. h := ReadCommonHeader(sd)
  8. m := ReadTextMsg(sd)
  9. AssertEqual(t, m.Content, "你好", "Message content => wrong")
  10. AssertEqual(t, h.ToUserName, "oUN420bxqFqlx0ZQHciUOesZO3PE", "ToUserName => wrong")
  11. }
  12. func TestCalculateSignature(t *testing.T) {
  13. }