infoc_test.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package service
  2. import (
  3. "testing"
  4. "github.com/smartystreets/goconvey/convey"
  5. )
  6. func TestServicebagLogInfoc(t *testing.T) {
  7. convey.Convey("bagLogInfoc", t, func(ctx convey.C) {
  8. var (
  9. uid = int64(0)
  10. bagID = int64(0)
  11. giftID = int64(0)
  12. num = int64(0)
  13. afterNum = int64(0)
  14. source = ""
  15. )
  16. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  17. s.bagLogInfoc(uid, bagID, giftID, num, afterNum, source)
  18. ctx.Convey("No return values", func(ctx convey.C) {
  19. })
  20. })
  21. })
  22. }
  23. func TestServicegiftActionInfoc(t *testing.T) {
  24. convey.Convey("giftActionInfoc", t, func(ctx convey.C) {
  25. var (
  26. uid = int64(0)
  27. roomid = int64(0)
  28. item = int64(0)
  29. value = int64(0)
  30. change = int64(0)
  31. describe = ""
  32. platform = ""
  33. )
  34. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  35. s.giftActionInfoc(uid, roomid, item, value, change, describe, platform)
  36. ctx.Convey("No return values", func(ctx convey.C) {
  37. })
  38. })
  39. })
  40. }
  41. func TestServiceMakeID(t *testing.T) {
  42. convey.Convey("MakeID", t, func(ctx convey.C) {
  43. var (
  44. uid = int64(0)
  45. )
  46. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  47. p1 := MakeID(uid)
  48. ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
  49. ctx.So(p1, convey.ShouldNotBeNil)
  50. })
  51. })
  52. })
  53. }