staff_test.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package archive
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/davecgh/go-spew/spew"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestStaffMid(t *testing.T) {
  9. var (
  10. c = context.Background()
  11. )
  12. convey.Convey("MidCount", t, func(ctx convey.C) {
  13. count, err := d.MidCount(c, 2880441)
  14. spew.Dump(count)
  15. ctx.Convey("Then err should be nil.fs should not be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. })
  18. })
  19. }
  20. func TestApply(t *testing.T) {
  21. var (
  22. c = context.Background()
  23. )
  24. convey.Convey("Apply", t, func(ctx convey.C) {
  25. data, err := d.Apply(c, 1)
  26. if err == nil {
  27. spew.Dump(data)
  28. }
  29. ctx.Convey("Then err should be nil.fs should not be nil.", func(ctx convey.C) {
  30. ctx.So(err, convey.ShouldBeNil)
  31. })
  32. })
  33. }
  34. func TestApplys(t *testing.T) {
  35. var (
  36. c = context.Background()
  37. )
  38. convey.Convey("Applys", t, func(ctx convey.C) {
  39. data, err := d.Applys(c, []int64{1, 11})
  40. if err == nil {
  41. spew.Dump(data)
  42. }
  43. ctx.Convey("Then err should be nil.fs should not be nil.", func(ctx convey.C) {
  44. ctx.So(err, convey.ShouldBeNil)
  45. })
  46. })
  47. }
  48. func TestFilterApplys(t *testing.T) {
  49. var (
  50. c = context.Background()
  51. )
  52. convey.Convey("FilterApplys", t, func(ctx convey.C) {
  53. data, err := d.FilterApplys(c, []int64{23213, 4052032}, 4052032)
  54. if err == nil {
  55. spew.Dump(data)
  56. }
  57. if err != nil {
  58. spew.Dump(err)
  59. }
  60. ctx.Convey("Then err should be nil.fs should not be nil.", func(ctx convey.C) {
  61. ctx.So(err, convey.ShouldBeNil)
  62. })
  63. })
  64. }