refactor: NewStep

This commit is contained in:
debugtalk
2021-12-08 13:20:23 +08:00
parent 99972064ab
commit a301266227
6 changed files with 110 additions and 102 deletions

View File

@@ -109,19 +109,19 @@ func (tc *TCase) ToTestCase() (*TestCase, error) {
}
for _, step := range tc.TestSteps {
if step.Request != nil {
testCase.TestSteps = append(testCase.TestSteps, &stepRequestWithOptionalArgs{
testCase.TestSteps = append(testCase.TestSteps, &StepRequestWithOptionalArgs{
step: step,
})
} else if step.TestCase != nil {
testCase.TestSteps = append(testCase.TestSteps, &stepTestCaseWithOptionalArgs{
testCase.TestSteps = append(testCase.TestSteps, &StepTestCaseWithOptionalArgs{
step: step,
})
} else if step.Transaction != nil {
testCase.TestSteps = append(testCase.TestSteps, &stepTransaction{
testCase.TestSteps = append(testCase.TestSteps, &StepTransaction{
step: step,
})
} else if step.Rendezvous != nil {
testCase.TestSteps = append(testCase.TestSteps, &stepRendezvous{
testCase.TestSteps = append(testCase.TestSteps, &StepRendezvous{
step: step,
})
} else {