OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / stretchr / testify / suite / interfaces.go
1 package suite
2
3 import "testing"
4
5 // TestingSuite can store and return the current *testing.T context
6 // generated by 'go test'.
7 type TestingSuite interface {
8         T() *testing.T
9         SetT(*testing.T)
10 }
11
12 // SetupAllSuite has a SetupSuite method, which will run before the
13 // tests in the suite are run.
14 type SetupAllSuite interface {
15         SetupSuite()
16 }
17
18 // SetupTestSuite has a SetupTest method, which will run before each
19 // test in the suite.
20 type SetupTestSuite interface {
21         SetupTest()
22 }
23
24 // TearDownAllSuite has a TearDownSuite method, which will run after
25 // all the tests in the suite have been run.
26 type TearDownAllSuite interface {
27         TearDownSuite()
28 }
29
30 // TearDownTestSuite has a TearDownTest method, which will run after
31 // each test in the suite.
32 type TearDownTestSuite interface {
33         TearDownTest()
34 }
35
36 // BeforeTest has a function to be executed right before the test
37 // starts and receives the suite and test names as input
38 type BeforeTest interface {
39         BeforeTest(suiteName, testName string)
40 }
41
42 // AfterTest has a function to be executed right after the test
43 // finishes and receives the suite and test names as input
44 type AfterTest interface {
45         AfterTest(suiteName, testName string)
46 }