-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_suite.go.example
44 lines (37 loc) · 1.02 KB
/
test_suite.go.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import (
"context"
"github.com/stretchr/testify/suite"
"testing"
)
// TemplateTestSuite is used to simplify generating test case
type (
TemplateTestSuite struct {
suite.Suite
t *testing.T
ctx context.Context
}
)
// Test_RunTemplateTestSuite Running the test suite
func Test_RunTemplateTestSuite(t *testing.T) {
suite.Run(t, &TemplateTestSuite{t: t})
}
// SetupSuite this function executes before the test suite begins
// execution
func (ts *TemplateTestSuite) SetupSuite() {
// set StartingNumber to one
}
// TearDownSuite which will run after all the tests in the suite
// have been run.
func (ts *TemplateTestSuite) TearDownSuite() {
// todo: TearDownSuite
}
// SetupTest SetupTestSuite has a SetupTest method, which will run
// before each test in the suite.
func (ts *TemplateTestSuite) SetupTest() {
ts.ctx = context.Background()
}
// TearDownTest TearDownTestSuite has a TearDownTest method, which
// will run after each test in the suite.
func (ts *TemplateTestSuite) TearDownTest() {
// todo: TearDownTest
}