msg_test.go 765 B

1234567891011121314151617181920212223242526272829303132333435
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/mcn/model"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestServicesendMsg(t *testing.T) {
  9. convey.Convey("sendMsg", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. arg = &model.ArgMsg{}
  13. )
  14. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  15. err := s.sendMsg(c, arg)
  16. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  17. ctx.So(err, convey.ShouldBeNil)
  18. })
  19. })
  20. })
  21. }
  22. func TestServicesetMsgTypeMap(t *testing.T) {
  23. convey.Convey("setMsgTypeMap", t, func(ctx convey.C) {
  24. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  25. s.setMsgTypeMap()
  26. ctx.Convey("No return values", func(ctx convey.C) {
  27. })
  28. })
  29. })
  30. }