av_charge_statis_test.go 881 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package charge
  2. import (
  3. "context"
  4. "testing"
  5. model "go-common/app/job/main/growup/model/charge"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func Test_GetAvChargeStatisMap(t *testing.T) {
  9. Convey("GetAvChargeStatisMap", t, func() {
  10. _, err := s.GetAvChargeStatisMap(context.Background())
  11. So(err, ShouldBeNil)
  12. })
  13. }
  14. func Test_GetAvChargeStatis(t *testing.T) {
  15. Convey("GetAvChargeStatis", t, func() {
  16. _, err := s.GetAvChargeStatis(context.Background())
  17. So(err, ShouldBeNil)
  18. })
  19. }
  20. func Test_AvChargeStatisDBStore(t *testing.T) {
  21. Convey("AvChargeStatisDBStore", t, func() {
  22. chargeStatisMap := make(map[int64]*model.AvChargeStatis)
  23. value := &model.AvChargeStatis{
  24. AvID: 11,
  25. MID: 11,
  26. TagID: 11,
  27. DBState: 1,
  28. }
  29. chargeStatisMap[11] = value
  30. err := s.AvChargeStatisDBStore(context.Background(), chargeStatisMap)
  31. So(err, ShouldBeNil)
  32. })
  33. }