Variant P1 for clone. Allow test changes in-progress
[anna.git] / example / diameter / launcher / testing / TestCase.cpp
index 6bc033d..8cbba4b 100644 (file)
@@ -223,8 +223,8 @@ bool TestCase::reset(bool hard) throw() {
 }
 
 void TestCase::assertInitialized() const throw(anna::RuntimeException) {
-  if (a_state != State::Initialized)
-    throw anna::RuntimeException(anna::functions::asString("Cannot program anymore. The test case %llu was started. You must reset it to append new steps.", a_id), ANNA_FILE_LOCATION);
+  if (isFinished())
+    throw anna::RuntimeException(anna::functions::asString("Cannot program anymore. The test case %llu has finished. You must reset it to append new steps (or do it during execution, which is also allowed).", a_id), ANNA_FILE_LOCATION);
 }
 
 void TestCase::assertMessage(const anna::DataBlock &db, bool toEntity) throw(anna::RuntimeException) {