infoc_test.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. package feed
  2. import (
  3. "context"
  4. "encoding/json"
  5. "testing"
  6. "time"
  7. "go-common/app/interface/main/app-card/model/card/ai"
  8. . "github.com/smartystreets/goconvey/convey"
  9. )
  10. func TestService_IndexInfoc(t *testing.T) {
  11. type args struct {
  12. c context.Context
  13. mid int64
  14. plat int8
  15. build int
  16. buvid string
  17. disid string
  18. api string
  19. userFeature json.RawMessage
  20. style int
  21. code int
  22. items []*ai.Item
  23. isRcmd bool
  24. pull bool
  25. newUser bool
  26. now time.Time
  27. zoneID int64
  28. adResponse string
  29. deviceID string
  30. network string
  31. flush int
  32. autoPlay string
  33. deviceType int
  34. }
  35. tests := []struct {
  36. name string
  37. args args
  38. }{
  39. // TODO: Add test cases.
  40. }
  41. for _, tt := range tests {
  42. Convey(tt.name, t, func() {
  43. s.IndexInfoc(tt.args.c, tt.args.mid, tt.args.plat, tt.args.build, tt.args.buvid, tt.args.disid, tt.args.api, tt.args.userFeature, tt.args.style, tt.args.code, tt.args.items, tt.args.isRcmd, tt.args.pull, tt.args.newUser, tt.args.now, tt.args.adResponse, tt.args.deviceID, tt.args.network, tt.args.flush, tt.args.autoPlay, tt.args.deviceType)
  44. })
  45. }
  46. }
  47. func TestService_infoc(t *testing.T) {
  48. type args struct {
  49. i interface{}
  50. }
  51. tests := []struct {
  52. name string
  53. args args
  54. }{
  55. // TODO: Add test cases.
  56. }
  57. for _, tt := range tests {
  58. t.Run(tt.name, func(t *testing.T) {
  59. s.infoc(tt.args.i)
  60. })
  61. }
  62. }
  63. func TestService_infocproc(t *testing.T) {
  64. tests := []struct {
  65. name string
  66. }{
  67. // TODO: Add test cases.
  68. }
  69. for _, tt := range tests {
  70. t.Run(tt.name, func(t *testing.T) {
  71. s.infocproc()
  72. })
  73. }
  74. }
  75. func Test_gotoMapID(t *testing.T) {
  76. type args struct {
  77. gt string
  78. }
  79. tests := []struct {
  80. name string
  81. args args
  82. wantId string
  83. }{
  84. // TODO: Add test cases.
  85. }
  86. for _, tt := range tests {
  87. t.Run(tt.name, func(t *testing.T) {
  88. if gotId := gotoMapID(tt.args.gt); gotId != tt.wantId {
  89. t.Errorf("gotoMapID() = %v, want %v", gotId, tt.wantId)
  90. }
  91. })
  92. }
  93. }