12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- package service
- import (
- "context"
- "testing"
- "github.com/smartystreets/goconvey/convey"
- "go-common/app/job/main/videoup-report/model/archive"
- )
- var a = &archive.Archive{
- ID: 10098208,
- Mid: 10920044,
- Attribute: 1097728,
- State: 0,
- Round: 99,
- TypeID: 21,
- }
- func TestServicearcReply(t *testing.T) {
- var (
- c = context.Background()
- replySwitch = int64(1)
- )
- convey.Convey("arcReply", t, func(ctx convey.C) {
- err := s.arcReply(c, a, replySwitch)
- ctx.Convey("Then err should be nil.", func(ctx convey.C) {
- ctx.So(err, convey.ShouldBeNil)
- })
- })
- }
- func TestServiceopenReply(t *testing.T) {
- var (
- c = context.Background()
- )
- convey.Convey("openReply", t, func(ctx convey.C) {
- err := s.openReply(c, a, archive.ReplyOff)
- ctx.Convey("Then err should be nil.", func(ctx convey.C) {
- ctx.So(err, convey.ShouldBeNil)
- })
- })
- }
- func TestServicecloseReply(t *testing.T) {
- var (
- c = context.Background()
- )
- convey.Convey("closeReply", t, func(ctx convey.C) {
- err := s.closeReply(c, a, archive.ReplyOn)
- ctx.Convey("Then err should be nil.", func(ctx convey.C) {
- ctx.So(err, convey.ShouldBeNil)
- })
- })
- }
|