kfc_test.go 609 B

12345678910111213141516171819202122232425262728293031
  1. package kfc
  2. import (
  3. "context"
  4. "fmt"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoSearchList(t *testing.T) {
  9. convey.Convey("SearchList", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. code = ""
  13. mid = int64(1505589)
  14. pn = 1
  15. ps = 15
  16. )
  17. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  18. rp, err := d.SearchList(c, code, mid, pn, ps)
  19. ctx.Convey("Then err should be nil.rp should not be nil.", func(ctx convey.C) {
  20. ctx.So(err, convey.ShouldBeNil)
  21. for _, v := range rp {
  22. fmt.Printf("%+v", v)
  23. }
  24. })
  25. })
  26. })
  27. }