refactor: convert API

This commit is contained in:
debugtalk
2021-10-11 11:30:31 +08:00
parent 188b5598d5
commit 5a74b12499
5 changed files with 32 additions and 32 deletions

View File

@@ -68,7 +68,8 @@ type IStep interface {
}
type ITestCase interface {
ToStruct() (*TestCase, error)
ToTestCase() (*TestCase, error)
ToTCase() (*TCase, error)
}
// used for testcase runner
@@ -77,7 +78,7 @@ type TestCase struct {
TestSteps []IStep
}
func (tc *TestCase) ToStruct() (*TestCase, error) {
func (tc *TestCase) ToTestCase() (*TestCase, error) {
return tc, nil
}
@@ -85,14 +86,6 @@ type TestCasePath struct {
Path string
}
func (path *TestCasePath) ToStruct() (*TestCase, error) {
testcase, err := loadTestFile(path)
if err != nil {
return nil, err
}
return testcase, nil
}
type TestCaseSummary struct{}
type StepData struct {