interfaces.go 798 B

12345678910111213141516171819202122232425262728293031323334
  1. package suite
  2. import "testing"
  3. // TestingSuite can store and return the current *testing.T context
  4. // generated by 'go test'.
  5. type TestingSuite interface {
  6. T() *testing.T
  7. SetT(*testing.T)
  8. }
  9. // SetupAllSuite has a SetupSuite method, which will run before the
  10. // tests in the suite are run.
  11. type SetupAllSuite interface {
  12. SetupSuite()
  13. }
  14. // SetupTestSuite has a SetupTest method, which will run before each
  15. // test in the suite.
  16. type SetupTestSuite interface {
  17. SetupTest()
  18. }
  19. // TearDownAllSuite has a TearDownSuite method, which will run after
  20. // all the tests in the suite have been run.
  21. type TearDownAllSuite interface {
  22. TearDownSuite()
  23. }
  24. // TearDownTestSuite has a TearDownTest method, which will run after
  25. // each test in the suite.
  26. type TearDownTestSuite interface {
  27. TearDownTest()
  28. }