1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- package bnj
- import (
- "context"
- "testing"
- "github.com/smartystreets/goconvey/convey"
- )
- func TestBnjAddCacheTimeFinish(t *testing.T) {
- convey.Convey("AddCacheTimeFinish", t, func(ctx convey.C) {
- var (
- c = context.Background()
- val = int64(0)
- )
- ctx.Convey("When everything gose positive", func(ctx convey.C) {
- err := d.AddCacheTimeFinish(c, val)
- ctx.Convey("Then err should be nil.", func(ctx convey.C) {
- ctx.So(err, convey.ShouldBeNil)
- })
- })
- })
- }
- func TestBnjCacheTimeFinish(t *testing.T) {
- convey.Convey("CacheTimeFinish", t, func(ctx convey.C) {
- var (
- c = context.Background()
- )
- ctx.Convey("When everything gose positive", func(ctx convey.C) {
- res, err := d.CacheTimeFinish(c)
- ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
- ctx.So(err, convey.ShouldBeNil)
- ctx.So(res, convey.ShouldNotBeNil)
- })
- })
- })
- }
- func TestBnjCacheLessTime(t *testing.T) {
- convey.Convey("CacheLessTime", t, func(ctx convey.C) {
- var (
- c = context.Background()
- )
- ctx.Convey("When everything gose positive", func(ctx convey.C) {
- res, err := d.CacheLessTime(c)
- ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
- ctx.So(err, convey.ShouldBeNil)
- ctx.So(res, convey.ShouldNotBeNil)
- })
- })
- })
- }
- func TestBnjAddCacheLessTime(t *testing.T) {
- convey.Convey("AddCacheLessTime", t, func(ctx convey.C) {
- var (
- c = context.Background()
- val = int64(0)
- )
- ctx.Convey("When everything gose positive", func(ctx convey.C) {
- err := d.AddCacheLessTime(c, val)
- ctx.Convey("Then err should be nil.", func(ctx convey.C) {
- ctx.So(err, convey.ShouldBeNil)
- })
- })
- })
- }
|