account_test.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package service
  2. import (
  3. "context"
  4. "encoding/json"
  5. "testing"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestService_NavNum(t *testing.T) {
  9. Convey("test nav num", t, WithService(func(s *Service) {
  10. mid := int64(883968)
  11. vmid := int64(883968)
  12. data := s.NavNum(context.Background(), mid, vmid)
  13. Printf("%+v", data)
  14. }))
  15. }
  16. func TestService_UpStat(t *testing.T) {
  17. Convey("test up stat", t, WithService(func(s *Service) {
  18. mid := int64(883968)
  19. data, err := s.UpStat(context.Background(), mid)
  20. So(err, ShouldBeNil)
  21. Printf("%+v", data)
  22. }))
  23. }
  24. func TestService_AccTags(t *testing.T) {
  25. Convey("test account tags", t, WithService(func(s *Service) {
  26. mid := int64(15555180)
  27. data, err := s.AccTags(context.Background(), mid)
  28. So(err, ShouldBeNil)
  29. str, _ := json.Marshal(data)
  30. Println(string(str))
  31. }))
  32. }
  33. func TestService_SetAccTags(t *testing.T) {
  34. Convey("test set account tags", t, WithService(func(s *Service) {
  35. tags := "a,b,c,test"
  36. ck := ""
  37. err := s.SetAccTags(context.Background(), tags, ck)
  38. So(err, ShouldBeNil)
  39. }))
  40. }
  41. func TestService_MyInfo(t *testing.T) {
  42. Convey("test my info", t, WithService(func(s *Service) {
  43. mid := int64(15555180)
  44. data, err := s.MyInfo(context.Background(), mid)
  45. So(err, ShouldBeNil)
  46. str, _ := json.Marshal(data)
  47. Println(string(str))
  48. }))
  49. }