figure_test.go 906 B

1234567891011121314151617181920212223242526272829303132333435
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaofigureInfoURI(t *testing.T) {
  8. convey.Convey("figureInfoURI", t, func(convCtx convey.C) {
  9. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  10. p1 := testDao.figureInfoURI()
  11. convCtx.Convey("Then p1 should not be nil.", func(convCtx convey.C) {
  12. convCtx.So(p1, convey.ShouldNotBeNil)
  13. })
  14. })
  15. })
  16. }
  17. func TestDaoFigureInfo(t *testing.T) {
  18. convey.Convey("FigureInfo", t, func(convCtx convey.C) {
  19. var (
  20. c = context.Background()
  21. mid = int64(0)
  22. )
  23. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  24. score, err := testDao.FigureInfo(c, mid)
  25. convCtx.Convey("Then err should be nil.score should not be nil.", func(convCtx convey.C) {
  26. convCtx.So(err, convey.ShouldBeNil)
  27. convCtx.So(score, convey.ShouldNotBeNil)
  28. })
  29. })
  30. })
  31. }