interfaces.go 869 B

123456789101112131415161718192021222324252627282930313233
  1. package suite
  2. import "testing"
  3. // SetupAllSuite has a SetupSuite method, which will run before the
  4. // tests in the suite are run.
  5. type SetupAllSuite interface {
  6. SetUpSuite(t *testing.T)
  7. }
  8. // SetupTestSuite has a SetupTest method, which will run before each
  9. // test in the suite.
  10. type SetupTestSuite interface {
  11. SetUpTest(t *testing.T)
  12. }
  13. // TearDownAllSuite has a TearDownSuite method, which will run after
  14. // all the tests in the suite have been run.
  15. type TearDownAllSuite interface {
  16. TearDownSuite(t *testing.T)
  17. }
  18. // TearDownTestSuite has a TearDownTest method, which will run after
  19. // each test in the suite.
  20. type TearDownTestSuite interface {
  21. TearDownTest(t *testing.T)
  22. }
  23. // TimeoutTestSuite has a OnTimeout method, which will run after
  24. // a single test times out after a period specified by -timeout flag.
  25. type TimeoutTestSuite interface {
  26. OnTimeout()
  27. }