refactor: NewStep

This commit is contained in:
debugtalk
2021-12-08 13:26:12 +08:00
parent a55f523fd7
commit 929247723a
6 changed files with 110 additions and 102 deletions
+4 -4
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 {