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.

19 satır
448B

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