+ if (stepNumber != -1) {
+ const TestStep *stepReferred = getStep(stepNumber);
+ if (!stepReferred)
+ throw anna::RuntimeException(anna::functions::asString("Step number (%d) do not exists (test case %llu, '%s')", stepNumber, a_id, a_description.c_str()), ANNA_FILE_LOCATION);
+
+ if (stepReferred->getType() != TestStep::Type::Wait)
+ throw anna::RuntimeException(anna::functions::asString("Step number (%d) must refer to a 'wait' step (test case %llu, '%s')", stepNumber, a_id, a_description.c_str()), ANNA_FILE_LOCATION);
+
+ const TestDiameterCondition &tc = (static_cast<const TestStepWaitDiameter*>(stepReferred))->getCondition();
+ if (tc.getCode() == "0") { // if regexp used, is not possible to detect this kind of errors
+ throw anna::RuntimeException(anna::functions::asString("Step number (%d) must refer to a 'wait for request' step (test case %llu, '%s')", stepNumber, a_id, a_description.c_str()), ANNA_FILE_LOCATION);
+ }
+ }
+
+ TestStepSendDiameterXml2c *step = new TestStepSendDiameterXml2c(this);