player_test.go 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package feed
  2. import (
  3. "context"
  4. "reflect"
  5. "testing"
  6. "go-common/app/service/main/archive/model/archive"
  7. . "github.com/smartystreets/goconvey/convey"
  8. )
  9. func TestService_ArchivesWithPlayer(t *testing.T) {
  10. type args struct {
  11. c context.Context
  12. aids []int64
  13. qn int
  14. platform string
  15. fnver int
  16. fnval int
  17. forceHost int
  18. build int
  19. }
  20. tests := []struct {
  21. name string
  22. args args
  23. wantRes map[int64]*archive.ArchiveWithPlayer
  24. wantErr bool
  25. }{
  26. // TODO: Add test cases.
  27. }
  28. for _, tt := range tests {
  29. Convey(tt.name, t, func() {
  30. gotRes, err := s.ArchivesWithPlayer(tt.args.c, tt.args.aids, tt.args.qn, tt.args.platform, tt.args.fnver, tt.args.fnval, tt.args.forceHost, tt.args.build)
  31. if (err != nil) != tt.wantErr {
  32. t.Errorf("Service.ArchivesWithPlayer() error = %v, wantErr %v", err, tt.wantErr)
  33. return
  34. }
  35. if !reflect.DeepEqual(gotRes, tt.wantRes) {
  36. t.Errorf("Service.ArchivesWithPlayer() = %v, want %v", gotRes, tt.wantRes)
  37. }
  38. })
  39. }
  40. }