docs: add description for interfaces

This commit is contained in:
debugtalk
2021-12-08 14:29:15 +08:00
parent 799284c121
commit 0d9c2873c1
+8 -3
View File
@@ -78,20 +78,25 @@ type TCase struct {
TestSteps []*TStep `json:"teststeps" yaml:"teststeps"` TestSteps []*TStep `json:"teststeps" yaml:"teststeps"`
} }
// IConfig represents interface for testcase config. // IConfig represents interface for testcase config,
// includes Config.
type IConfig interface { type IConfig interface {
Name() string Name() string
ToStruct() *TConfig ToStruct() *TConfig
} }
// IStep represents interface for all types for teststeps. // IStep represents interface for all types for teststeps, includes:
// StepRequest, StepRequestWithOptionalArgs, StepRequestValidation, StepRequestExtraction,
// StepTestCaseWithOptionalArgs,
// StepTransaction, StepRendezvous.
type IStep interface { type IStep interface {
Name() string Name() string
Type() string Type() string
ToStruct() *TStep ToStruct() *TStep
} }
// ITestCase represents interface for all types for testcases. // ITestCase represents interface for testcases,
// includes TestCase and TestCasePath.
type ITestCase interface { type ITestCase interface {
ToTestCase() (*TestCase, error) ToTestCase() (*TestCase, error)
ToTCase() (*TCase, error) ToTCase() (*TCase, error)