Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
package dao
import (
"context"
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDaoManagers(t *testing.T) {
convey.Convey("Managers", t, func(convCtx convey.C) {
var (
c = context.Background()
)
convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
manMap, err := d.Managers(c)
convCtx.Convey("Then err should be nil.manMap should not be nil.", func(convCtx convey.C) {
convCtx.So(err, convey.ShouldBeNil)
convCtx.So(manMap, convey.ShouldNotBeNil)
})
})
})
}
func TestDaoManager(t *testing.T) {
convey.Convey("Manager", t, func(convCtx convey.C) {
var (
c = context.Background()
pn = int64(0)
ps = int64(0)
)
convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
mi, err := d.Manager(c, pn, ps)
convCtx.Convey("Then err should be nil.mi should not be nil.", func(convCtx convey.C) {
convCtx.So(err, convey.ShouldBeNil)
convCtx.So(mi, convey.ShouldNotBeNil)
})
})
})
}
func TestDaoManagerTotal(t *testing.T) {
convey.Convey("ManagerTotal", t, func(convCtx convey.C) {
var (
c = context.Background()
)
convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
count, err := d.ManagerTotal(c)
convCtx.Convey("Then err should be nil.count should not be nil.", func(convCtx convey.C) {
convCtx.So(err, convey.ShouldBeNil)
convCtx.So(count, convey.ShouldNotBeNil)
})
})
})
}