pgc_test.go 820 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package web
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestService_PgcFull(t *testing.T) {
  8. Convey("pgc full", t, WithService(func(s *Service) {
  9. var (
  10. c = context.Background()
  11. tp = int(2)
  12. pn = int64(1)
  13. ps = int64(10)
  14. source = "youku"
  15. )
  16. res, err := s.PgcFull(c, tp, pn, ps, source)
  17. So(err, ShouldBeNil)
  18. So(res, ShouldNotBeNil)
  19. }))
  20. }
  21. func TestService_PgcIncre(t *testing.T) {
  22. Convey("pgc incre", t, WithService(func(s *Service) {
  23. var (
  24. c = context.Background()
  25. tp = int(2)
  26. pn = int64(1)
  27. ps = int64(10)
  28. start = int64(1505876448)
  29. end = int64(1505876450)
  30. source = "youku"
  31. )
  32. res, err := s.PgcIncre(c, tp, pn, ps, start, end, source)
  33. So(err, ShouldBeNil)
  34. So(res, ShouldNotBeNil)
  35. }))
  36. }