csv_test.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package service
  2. import (
  3. "go-common/app/admin/main/laser/model"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestServiceFormatCSV(t *testing.T) {
  8. convey.Convey("FormatCSV", t, func(convCtx convey.C) {
  9. var (
  10. records = [][]string{}
  11. )
  12. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  13. FormatCSV(records)
  14. convCtx.Convey("Then err should be nil.data should not be nil.", func(convCtx convey.C) {
  15. })
  16. })
  17. })
  18. }
  19. func TestServiceformatAuditCargo(t *testing.T) {
  20. convey.Convey("formatAuditCargo", t, func(convCtx convey.C) {
  21. var (
  22. wrappers = []*model.CargoViewWrapper{}
  23. lineWidth = int(0)
  24. )
  25. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  26. formatAuditCargo(wrappers, lineWidth)
  27. convCtx.Convey("Then data should not be nil.", func(convCtx convey.C) {
  28. })
  29. })
  30. })
  31. }
  32. func TestServiceformatVideoAuditStat(t *testing.T) {
  33. convey.Convey("formatVideoAuditStat", t, func(convCtx convey.C) {
  34. var (
  35. statViewExts = []*model.StatViewExt{}
  36. lineWidth = int(0)
  37. )
  38. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  39. formatVideoAuditStat(statViewExts, lineWidth)
  40. convCtx.Convey("Then data should not be nil.", func(convCtx convey.C) {
  41. })
  42. })
  43. })
  44. }